@wordpress/edit-site 6.3.0 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (334) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/add-new-pattern/index.js +14 -3
  3. package/build/components/add-new-pattern/index.js.map +1 -1
  4. package/build/components/add-new-post/index.js +2 -1
  5. package/build/components/add-new-post/index.js.map +1 -1
  6. package/build/components/add-new-template/index.js +3 -1
  7. package/build/components/add-new-template/index.js.map +1 -1
  8. package/build/components/add-new-template/utils.js +2 -2
  9. package/build/components/add-new-template/utils.js.map +1 -1
  10. package/build/components/block-editor/use-site-editor-settings.js +1 -82
  11. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  12. package/build/components/editor/index.js +71 -20
  13. package/build/components/editor/index.js.map +1 -1
  14. package/build/components/global-styles/block-preview-panel.js +14 -5
  15. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  16. package/build/components/global-styles/font-families.js +40 -22
  17. package/build/components/global-styles/font-families.js.map +1 -1
  18. package/build/components/global-styles/font-library-modal/context.js +0 -5
  19. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  20. package/build/components/global-styles/font-library-modal/font-collection.js +25 -5
  21. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  22. package/build/components/global-styles/font-library-modal/index.js +5 -12
  23. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  24. package/build/components/global-styles/font-library-modal/installed-fonts.js +78 -15
  25. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  26. package/build/components/global-styles/font-library-modal/upload-fonts.js +2 -3
  27. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  28. package/build/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +39 -0
  29. package/build/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js.map +1 -0
  30. package/build/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +39 -0
  31. package/build/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js.map +1 -0
  32. package/build/components/global-styles/font-sizes/font-size-preview.js +44 -0
  33. package/build/components/global-styles/font-sizes/font-size-preview.js.map +1 -0
  34. package/build/components/global-styles/font-sizes/font-size.js +213 -0
  35. package/build/components/global-styles/font-sizes/font-size.js.map +1 -0
  36. package/build/components/global-styles/font-sizes/font-sizes-count.js +50 -0
  37. package/build/components/global-styles/font-sizes/font-sizes-count.js.map +1 -0
  38. package/build/components/global-styles/font-sizes/font-sizes.js +163 -0
  39. package/build/components/global-styles/font-sizes/font-sizes.js.map +1 -0
  40. package/build/components/global-styles/font-sizes/rename-font-size-dialog.js +67 -0
  41. package/build/components/global-styles/font-sizes/rename-font-size-dialog.js.map +1 -0
  42. package/build/components/global-styles/screen-block.js +10 -8
  43. package/build/components/global-styles/screen-block.js.map +1 -1
  44. package/build/components/global-styles/screen-style-variations.js +2 -2
  45. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  46. package/build/components/global-styles/screen-typeset.js +40 -0
  47. package/build/components/global-styles/screen-typeset.js.map +1 -0
  48. package/build/components/global-styles/screen-typography-element.js +14 -0
  49. package/build/components/global-styles/screen-typography-element.js.map +1 -1
  50. package/build/components/global-styles/screen-typography.js +5 -6
  51. package/build/components/global-styles/screen-typography.js.map +1 -1
  52. package/build/components/global-styles/shadows-edit-panel.js +50 -59
  53. package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
  54. package/build/components/global-styles/size-control/index.js +85 -0
  55. package/build/components/global-styles/size-control/index.js.map +1 -0
  56. package/build/components/global-styles/style-variations-container.js +3 -0
  57. package/build/components/global-styles/style-variations-container.js.map +1 -1
  58. package/build/components/global-styles/typeset-button.js +97 -0
  59. package/build/components/global-styles/typeset-button.js.map +1 -0
  60. package/build/components/global-styles/typeset.js +80 -0
  61. package/build/components/global-styles/typeset.js.map +1 -0
  62. package/build/components/global-styles/ui.js +12 -0
  63. package/build/components/global-styles/ui.js.map +1 -1
  64. package/build/components/global-styles/utils.js +10 -1
  65. package/build/components/global-styles/utils.js.map +1 -1
  66. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  67. package/build/components/global-styles/variations/variations-typography.js +1 -1
  68. package/build/components/global-styles/variations/variations-typography.js.map +1 -1
  69. package/build/components/layout/index.js +6 -0
  70. package/build/components/layout/index.js.map +1 -1
  71. package/build/components/layout/router.js +14 -6
  72. package/build/components/layout/router.js.map +1 -1
  73. package/build/components/page-patterns/fields.js +230 -0
  74. package/build/components/page-patterns/fields.js.map +1 -0
  75. package/build/components/page-patterns/header.js +1 -1
  76. package/build/components/page-patterns/header.js.map +1 -1
  77. package/build/components/page-patterns/index.js +21 -227
  78. package/build/components/page-patterns/index.js.map +1 -1
  79. package/build/components/page-patterns/use-patterns.js +26 -1
  80. package/build/components/page-patterns/use-patterns.js.map +1 -1
  81. package/build/components/page-templates/fields.js +169 -0
  82. package/build/components/page-templates/fields.js.map +1 -0
  83. package/build/components/page-templates/index.js +38 -198
  84. package/build/components/page-templates/index.js.map +1 -1
  85. package/build/components/post-edit/index.js +117 -0
  86. package/build/components/post-edit/index.js.map +1 -0
  87. package/build/components/post-fields/index.js +318 -0
  88. package/build/components/post-fields/index.js.map +1 -0
  89. package/build/components/post-list/index.js +339 -0
  90. package/build/components/post-list/index.js.map +1 -0
  91. package/build/components/posts-app/router.js +3 -3
  92. package/build/components/posts-app/router.js.map +1 -1
  93. package/build/components/sidebar-dataviews/add-new-view.js +2 -2
  94. package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
  95. package/build/components/sidebar-dataviews/dataview-item.js +2 -3
  96. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  97. package/build/components/sidebar-dataviews/default-views.js +103 -91
  98. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  99. package/build/components/sidebar-dataviews/index.js +2 -2
  100. package/build/components/sidebar-dataviews/index.js.map +1 -1
  101. package/build/components/sidebar-navigation-screen-global-styles/content.js +64 -0
  102. package/build/components/sidebar-navigation-screen-global-styles/content.js.map +1 -0
  103. package/build/components/sidebar-navigation-screen-global-styles/index.js +2 -47
  104. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  105. package/build/components/site-hub/index.js +6 -3
  106. package/build/components/site-hub/index.js.map +1 -1
  107. package/build/components/style-book/index.js +22 -25
  108. package/build/components/style-book/index.js.map +1 -1
  109. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +5 -0
  110. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  111. package/build/hooks/push-changes-to-global-styles/index.js +3 -4
  112. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  113. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -4
  114. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  115. package/build/index.js +4 -2
  116. package/build/index.js.map +1 -1
  117. package/build/store/selectors.js +34 -6
  118. package/build/store/selectors.js.map +1 -1
  119. package/build/utils/get-filtered-template-parts.js +64 -0
  120. package/build/utils/get-filtered-template-parts.js.map +1 -0
  121. package/build-module/components/add-new-pattern/index.js +14 -3
  122. package/build-module/components/add-new-pattern/index.js.map +1 -1
  123. package/build-module/components/add-new-post/index.js +2 -1
  124. package/build-module/components/add-new-post/index.js.map +1 -1
  125. package/build-module/components/add-new-template/index.js +3 -1
  126. package/build-module/components/add-new-template/index.js.map +1 -1
  127. package/build-module/components/add-new-template/utils.js +2 -2
  128. package/build-module/components/add-new-template/utils.js.map +1 -1
  129. package/build-module/components/block-editor/use-site-editor-settings.js +1 -82
  130. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  131. package/build-module/components/editor/index.js +73 -22
  132. package/build-module/components/editor/index.js.map +1 -1
  133. package/build-module/components/global-styles/block-preview-panel.js +14 -5
  134. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  135. package/build-module/components/global-styles/font-families.js +42 -24
  136. package/build-module/components/global-styles/font-families.js.map +1 -1
  137. package/build-module/components/global-styles/font-library-modal/context.js +0 -5
  138. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  139. package/build-module/components/global-styles/font-library-modal/font-collection.js +26 -6
  140. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  141. package/build-module/components/global-styles/font-library-modal/index.js +5 -12
  142. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  143. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +81 -18
  144. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  145. package/build-module/components/global-styles/font-library-modal/upload-fonts.js +2 -3
  146. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  147. package/build-module/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +32 -0
  148. package/build-module/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js.map +1 -0
  149. package/build-module/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +32 -0
  150. package/build-module/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js.map +1 -0
  151. package/build-module/components/global-styles/font-sizes/font-size-preview.js +37 -0
  152. package/build-module/components/global-styles/font-sizes/font-size-preview.js.map +1 -0
  153. package/build-module/components/global-styles/font-sizes/font-size.js +207 -0
  154. package/build-module/components/global-styles/font-sizes/font-size.js.map +1 -0
  155. package/build-module/components/global-styles/font-sizes/font-sizes-count.js +43 -0
  156. package/build-module/components/global-styles/font-sizes/font-sizes-count.js.map +1 -0
  157. package/build-module/components/global-styles/font-sizes/font-sizes.js +157 -0
  158. package/build-module/components/global-styles/font-sizes/font-sizes.js.map +1 -0
  159. package/build-module/components/global-styles/font-sizes/rename-font-size-dialog.js +61 -0
  160. package/build-module/components/global-styles/font-sizes/rename-font-size-dialog.js.map +1 -0
  161. package/build-module/components/global-styles/screen-block.js +10 -8
  162. package/build-module/components/global-styles/screen-block.js.map +1 -1
  163. package/build-module/components/global-styles/screen-style-variations.js +2 -2
  164. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  165. package/build-module/components/global-styles/screen-typeset.js +34 -0
  166. package/build-module/components/global-styles/screen-typeset.js.map +1 -0
  167. package/build-module/components/global-styles/screen-typography-element.js +14 -0
  168. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  169. package/build-module/components/global-styles/screen-typography.js +5 -6
  170. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  171. package/build-module/components/global-styles/shadows-edit-panel.js +51 -60
  172. package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
  173. package/build-module/components/global-styles/size-control/index.js +79 -0
  174. package/build-module/components/global-styles/size-control/index.js.map +1 -0
  175. package/build-module/components/global-styles/style-variations-container.js +3 -0
  176. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  177. package/build-module/components/global-styles/typeset-button.js +89 -0
  178. package/build-module/components/global-styles/typeset-button.js.map +1 -0
  179. package/build-module/components/global-styles/typeset.js +71 -0
  180. package/build-module/components/global-styles/typeset.js.map +1 -0
  181. package/build-module/components/global-styles/ui.js +12 -0
  182. package/build-module/components/global-styles/ui.js.map +1 -1
  183. package/build-module/components/global-styles/utils.js +10 -1
  184. package/build-module/components/global-styles/utils.js.map +1 -1
  185. package/build-module/components/global-styles/variations/variations-color.js +1 -1
  186. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  187. package/build-module/components/global-styles/variations/variations-typography.js +1 -2
  188. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  189. package/build-module/components/layout/index.js +6 -0
  190. package/build-module/components/layout/index.js.map +1 -1
  191. package/build-module/components/layout/router.js +14 -6
  192. package/build-module/components/layout/router.js.map +1 -1
  193. package/build-module/components/page-patterns/fields.js +223 -0
  194. package/build-module/components/page-patterns/fields.js.map +1 -0
  195. package/build-module/components/page-patterns/header.js +1 -1
  196. package/build-module/components/page-patterns/header.js.map +1 -1
  197. package/build-module/components/page-patterns/index.js +24 -230
  198. package/build-module/components/page-patterns/index.js.map +1 -1
  199. package/build-module/components/page-patterns/use-patterns.js +26 -1
  200. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  201. package/build-module/components/page-templates/fields.js +160 -0
  202. package/build-module/components/page-templates/fields.js.map +1 -0
  203. package/build-module/components/page-templates/index.js +39 -199
  204. package/build-module/components/page-templates/index.js.map +1 -1
  205. package/build-module/components/post-edit/index.js +110 -0
  206. package/build-module/components/post-edit/index.js.map +1 -0
  207. package/build-module/components/post-fields/index.js +310 -0
  208. package/build-module/components/post-fields/index.js.map +1 -0
  209. package/build-module/components/post-list/index.js +333 -0
  210. package/build-module/components/post-list/index.js.map +1 -0
  211. package/build-module/components/posts-app/router.js +3 -3
  212. package/build-module/components/posts-app/router.js.map +1 -1
  213. package/build-module/components/sidebar-dataviews/add-new-view.js +2 -2
  214. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
  215. package/build-module/components/sidebar-dataviews/dataview-item.js +2 -3
  216. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  217. package/build-module/components/sidebar-dataviews/default-views.js +102 -90
  218. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  219. package/build-module/components/sidebar-dataviews/index.js +5 -5
  220. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  221. package/build-module/components/sidebar-navigation-screen-global-styles/content.js +57 -0
  222. package/build-module/components/sidebar-navigation-screen-global-styles/content.js.map +1 -0
  223. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +2 -47
  224. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  225. package/build-module/components/site-hub/index.js +7 -4
  226. package/build-module/components/site-hub/index.js.map +1 -1
  227. package/build-module/components/style-book/index.js +23 -26
  228. package/build-module/components/style-book/index.js.map +1 -1
  229. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +5 -0
  230. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  231. package/build-module/hooks/push-changes-to-global-styles/index.js +3 -4
  232. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  233. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -3
  234. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  235. package/build-module/index.js +4 -2
  236. package/build-module/index.js.map +1 -1
  237. package/build-module/store/selectors.js +35 -7
  238. package/build-module/store/selectors.js.map +1 -1
  239. package/build-module/utils/get-filtered-template-parts.js +57 -0
  240. package/build-module/utils/get-filtered-template-parts.js.map +1 -0
  241. package/build-style/posts-rtl.css +749 -492
  242. package/build-style/posts.css +749 -492
  243. package/build-style/style-rtl.css +956 -613
  244. package/build-style/style.css +956 -613
  245. package/package.json +41 -41
  246. package/src/components/add-new-pattern/index.js +16 -5
  247. package/src/components/add-new-post/index.js +2 -1
  248. package/src/components/add-new-template/index.js +4 -1
  249. package/src/components/add-new-template/style.scss +4 -6
  250. package/src/components/add-new-template/utils.js +10 -6
  251. package/src/components/block-editor/use-site-editor-settings.js +15 -111
  252. package/src/components/editor/index.js +80 -22
  253. package/src/components/editor/style.scss +59 -1
  254. package/src/components/global-styles/block-preview-panel.js +22 -9
  255. package/src/components/global-styles/font-families.js +65 -32
  256. package/src/components/global-styles/font-library-modal/context.js +0 -5
  257. package/src/components/global-styles/font-library-modal/font-collection.js +34 -10
  258. package/src/components/global-styles/font-library-modal/index.js +6 -9
  259. package/src/components/global-styles/font-library-modal/installed-fonts.js +115 -16
  260. package/src/components/global-styles/font-library-modal/style.scss +9 -0
  261. package/src/components/global-styles/font-library-modal/upload-fonts.js +2 -2
  262. package/src/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +43 -0
  263. package/src/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +37 -0
  264. package/src/components/global-styles/font-sizes/font-size-preview.js +43 -0
  265. package/src/components/global-styles/font-sizes/font-size.js +250 -0
  266. package/src/components/global-styles/font-sizes/font-sizes-count.js +40 -0
  267. package/src/components/global-styles/font-sizes/font-sizes.js +263 -0
  268. package/src/components/global-styles/font-sizes/rename-font-size-dialog.js +70 -0
  269. package/src/components/global-styles/screen-block.js +12 -14
  270. package/src/components/global-styles/screen-style-variations.js +2 -2
  271. package/src/components/global-styles/screen-typeset.js +42 -0
  272. package/src/components/global-styles/screen-typography-element.js +14 -0
  273. package/src/components/global-styles/screen-typography.js +7 -6
  274. package/src/components/global-styles/shadows-edit-panel.js +66 -73
  275. package/src/components/global-styles/size-control/index.js +86 -0
  276. package/src/components/global-styles/style-variations-container.js +4 -0
  277. package/src/components/global-styles/style.scss +17 -10
  278. package/src/components/global-styles/typeset-button.js +93 -0
  279. package/src/components/global-styles/typeset.js +73 -0
  280. package/src/components/global-styles/ui.js +15 -0
  281. package/src/components/global-styles/utils.js +13 -1
  282. package/src/components/global-styles/variations/variations-color.js +1 -1
  283. package/src/components/global-styles/variations/variations-typography.js +1 -2
  284. package/src/components/layout/index.js +11 -0
  285. package/src/components/layout/router.js +13 -5
  286. package/src/components/layout/style.scss +34 -8
  287. package/src/components/page-patterns/fields.js +251 -0
  288. package/src/components/page-patterns/header.js +1 -1
  289. package/src/components/page-patterns/index.js +24 -246
  290. package/src/components/page-patterns/style.scss +82 -85
  291. package/src/components/page-patterns/use-patterns.js +31 -1
  292. package/src/components/page-templates/fields.js +157 -0
  293. package/src/components/page-templates/index.js +46 -192
  294. package/src/components/page-templates/style.scss +19 -8
  295. package/src/components/post-edit/index.js +115 -0
  296. package/src/components/post-edit/style.scss +9 -0
  297. package/src/components/post-fields/index.js +357 -0
  298. package/src/components/post-list/index.js +386 -0
  299. package/src/components/{posts-app → post-list}/style.scss +12 -9
  300. package/src/components/posts-app/router.js +3 -3
  301. package/src/components/sidebar-dataviews/add-new-view.js +2 -4
  302. package/src/components/sidebar-dataviews/dataview-item.js +2 -2
  303. package/src/components/sidebar-dataviews/default-views.js +116 -104
  304. package/src/components/sidebar-dataviews/index.js +4 -3
  305. package/src/components/sidebar-navigation-screen-global-styles/content.js +55 -0
  306. package/src/components/sidebar-navigation-screen-global-styles/index.js +1 -55
  307. package/src/components/site-hub/index.js +11 -2
  308. package/src/components/site-icon/style.scss +4 -1
  309. package/src/components/style-book/index.js +27 -32
  310. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +5 -0
  311. package/src/hooks/push-changes-to-global-styles/index.js +3 -4
  312. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -3
  313. package/src/index.js +6 -2
  314. package/src/posts.scss +1 -1
  315. package/src/store/selectors.js +53 -14
  316. package/src/store/test/selectors.js +1 -26
  317. package/src/style.scss +2 -1
  318. package/src/utils/get-filtered-template-parts.js +61 -0
  319. package/src/utils/test/get-filtered-template-parts.js +127 -0
  320. package/build/components/global-styles/screen-background.js +0 -36
  321. package/build/components/global-styles/screen-background.js.map +0 -1
  322. package/build/components/posts-app/posts-list.js +0 -568
  323. package/build/components/posts-app/posts-list.js.map +0 -1
  324. package/build/utils/clone-deep.js +0 -15
  325. package/build/utils/clone-deep.js.map +0 -1
  326. package/build-module/components/global-styles/screen-background.js +0 -30
  327. package/build-module/components/global-styles/screen-background.js.map +0 -1
  328. package/build-module/components/posts-app/posts-list.js +0 -560
  329. package/build-module/components/posts-app/posts-list.js.map +0 -1
  330. package/build-module/utils/clone-deep.js +0 -9
  331. package/build-module/utils/clone-deep.js.map +0 -1
  332. package/src/components/global-styles/screen-background.js +0 -29
  333. package/src/components/posts-app/posts-list.js +0 -651
  334. package/src/utils/clone-deep.js +0 -8
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.DEFAULT_CONFIG_PER_VIEW_TYPE = void 0;
6
+ exports.defaultLayouts = void 0;
7
7
  exports.useDefaultViews = useDefaultViews;
8
8
  var _i18n = require("@wordpress/i18n");
9
9
  var _icons = require("@wordpress/icons");
@@ -19,17 +19,31 @@ var _constants = require("../../utils/constants");
19
19
  * Internal dependencies
20
20
  */
21
21
 
22
- const DEFAULT_CONFIG_PER_VIEW_TYPE = exports.DEFAULT_CONFIG_PER_VIEW_TYPE = {
22
+ const defaultLayouts = exports.defaultLayouts = {
23
23
  [_constants.LAYOUT_TABLE]: {
24
- primaryField: 'title'
24
+ layout: {
25
+ primaryField: 'title',
26
+ styles: {
27
+ 'featured-image': {
28
+ width: '1%'
29
+ },
30
+ title: {
31
+ maxWidth: 300
32
+ }
33
+ }
34
+ }
25
35
  },
26
36
  [_constants.LAYOUT_GRID]: {
27
- mediaField: 'featured-image',
28
- primaryField: 'title'
37
+ layout: {
38
+ mediaField: 'featured-image',
39
+ primaryField: 'title'
40
+ }
29
41
  },
30
42
  [_constants.LAYOUT_LIST]: {
31
- primaryField: 'title',
32
- mediaField: 'featured-image'
43
+ layout: {
44
+ primaryField: 'title',
45
+ mediaField: 'featured-image'
46
+ }
33
47
  }
34
48
  };
35
49
  const DEFAULT_POST_BASE = {
@@ -43,9 +57,7 @@ const DEFAULT_POST_BASE = {
43
57
  direction: 'desc'
44
58
  },
45
59
  fields: ['title', 'author', 'status'],
46
- layout: {
47
- ...DEFAULT_CONFIG_PER_VIEW_TYPE[_constants.LAYOUT_LIST]
48
- }
60
+ layout: defaultLayouts[_constants.LAYOUT_LIST].layout
49
61
  };
50
62
  function useDefaultViews({
51
63
  postType
@@ -57,86 +69,86 @@ function useDefaultViews({
57
69
  return getPostType(postType)?.labels;
58
70
  }, [postType]);
59
71
  return (0, _element.useMemo)(() => {
60
- return {
61
- [postType]: [{
62
- title: labels?.all_items || (0, _i18n.__)('All items'),
63
- slug: 'all',
64
- icon: _icons.pages,
65
- view: DEFAULT_POST_BASE
66
- }, {
67
- title: (0, _i18n.__)('Published'),
68
- slug: 'published',
69
- icon: _icons.published,
70
- view: {
71
- ...DEFAULT_POST_BASE,
72
- filters: [{
73
- field: 'status',
74
- operator: _constants.OPERATOR_IS_ANY,
75
- value: 'publish'
76
- }]
77
- }
78
- }, {
79
- title: (0, _i18n.__)('Scheduled'),
80
- slug: 'future',
81
- icon: _icons.scheduled,
82
- view: {
83
- ...DEFAULT_POST_BASE,
84
- filters: [{
85
- field: 'status',
86
- operator: _constants.OPERATOR_IS_ANY,
87
- value: 'future'
88
- }]
89
- }
90
- }, {
91
- title: (0, _i18n.__)('Drafts'),
92
- slug: 'drafts',
93
- icon: _icons.drafts,
94
- view: {
95
- ...DEFAULT_POST_BASE,
96
- filters: [{
97
- field: 'status',
98
- operator: _constants.OPERATOR_IS_ANY,
99
- value: 'draft'
100
- }]
101
- }
102
- }, {
103
- title: (0, _i18n.__)('Pending'),
104
- slug: 'pending',
105
- icon: _icons.pending,
106
- view: {
107
- ...DEFAULT_POST_BASE,
108
- filters: [{
109
- field: 'status',
110
- operator: _constants.OPERATOR_IS_ANY,
111
- value: 'pending'
112
- }]
113
- }
114
- }, {
115
- title: (0, _i18n.__)('Private'),
116
- slug: 'private',
117
- icon: _icons.notAllowed,
118
- view: {
119
- ...DEFAULT_POST_BASE,
120
- filters: [{
121
- field: 'status',
122
- operator: _constants.OPERATOR_IS_ANY,
123
- value: 'private'
124
- }]
125
- }
126
- }, {
127
- title: (0, _i18n.__)('Trash'),
128
- slug: 'trash',
129
- icon: _icons.trash,
130
- view: {
131
- ...DEFAULT_POST_BASE,
132
- filters: [{
133
- field: 'status',
134
- operator: _constants.OPERATOR_IS_ANY,
135
- value: 'trash'
136
- }]
137
- }
138
- }]
139
- };
140
- }, [labels, postType]);
72
+ return [{
73
+ title: labels?.all_items || (0, _i18n.__)('All items'),
74
+ slug: 'all',
75
+ icon: _icons.pages,
76
+ view: DEFAULT_POST_BASE
77
+ }, {
78
+ title: (0, _i18n.__)('Published'),
79
+ slug: 'published',
80
+ icon: _icons.published,
81
+ view: {
82
+ ...DEFAULT_POST_BASE,
83
+ filters: [{
84
+ field: 'status',
85
+ operator: _constants.OPERATOR_IS_ANY,
86
+ value: 'publish'
87
+ }]
88
+ }
89
+ }, {
90
+ title: (0, _i18n.__)('Scheduled'),
91
+ slug: 'future',
92
+ icon: _icons.scheduled,
93
+ view: {
94
+ ...DEFAULT_POST_BASE,
95
+ filters: [{
96
+ field: 'status',
97
+ operator: _constants.OPERATOR_IS_ANY,
98
+ value: 'future'
99
+ }]
100
+ }
101
+ }, {
102
+ title: (0, _i18n.__)('Drafts'),
103
+ slug: 'drafts',
104
+ icon: _icons.drafts,
105
+ view: {
106
+ ...DEFAULT_POST_BASE,
107
+ filters: [{
108
+ field: 'status',
109
+ operator: _constants.OPERATOR_IS_ANY,
110
+ value: 'draft'
111
+ }]
112
+ }
113
+ }, {
114
+ title: (0, _i18n.__)('Pending'),
115
+ slug: 'pending',
116
+ icon: _icons.pending,
117
+ view: {
118
+ ...DEFAULT_POST_BASE,
119
+ filters: [{
120
+ field: 'status',
121
+ operator: _constants.OPERATOR_IS_ANY,
122
+ value: 'pending'
123
+ }]
124
+ }
125
+ }, {
126
+ title: (0, _i18n.__)('Private'),
127
+ slug: 'private',
128
+ icon: _icons.notAllowed,
129
+ view: {
130
+ ...DEFAULT_POST_BASE,
131
+ filters: [{
132
+ field: 'status',
133
+ operator: _constants.OPERATOR_IS_ANY,
134
+ value: 'private'
135
+ }]
136
+ }
137
+ }, {
138
+ title: (0, _i18n.__)('Trash'),
139
+ slug: 'trash',
140
+ icon: _icons.trash,
141
+ view: {
142
+ ...DEFAULT_POST_BASE,
143
+ type: _constants.LAYOUT_TABLE,
144
+ layout: defaultLayouts[_constants.LAYOUT_TABLE].layout,
145
+ filters: [{
146
+ field: 'status',
147
+ operator: _constants.OPERATOR_IS_ANY,
148
+ value: 'trash'
149
+ }]
150
+ }
151
+ }];
152
+ }, [labels]);
141
153
  }
142
154
  //# sourceMappingURL=default-views.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_icons","_data","_coreData","_element","_constants","DEFAULT_CONFIG_PER_VIEW_TYPE","exports","LAYOUT_TABLE","primaryField","LAYOUT_GRID","mediaField","LAYOUT_LIST","DEFAULT_POST_BASE","type","search","filters","page","perPage","sort","field","direction","fields","layout","useDefaultViews","postType","labels","useSelect","select","getPostType","coreStore","useMemo","title","all_items","__","slug","icon","pages","view","published","operator","OPERATOR_IS_ANY","value","scheduled","drafts","pending","notAllowed","trash"],"sources":["@wordpress/edit-site/src/components/sidebar-dataviews/default-views.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nimport {\n\ttrash,\n\tpages,\n\tdrafts,\n\tpublished,\n\tscheduled,\n\tpending,\n\tnotAllowed,\n} from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tLAYOUT_LIST,\n\tLAYOUT_TABLE,\n\tLAYOUT_GRID,\n\tOPERATOR_IS_ANY,\n} from '../../utils/constants';\n\nexport const DEFAULT_CONFIG_PER_VIEW_TYPE = {\n\t[ LAYOUT_TABLE ]: {\n\t\tprimaryField: 'title',\n\t},\n\t[ LAYOUT_GRID ]: {\n\t\tmediaField: 'featured-image',\n\t\tprimaryField: 'title',\n\t},\n\t[ LAYOUT_LIST ]: {\n\t\tprimaryField: 'title',\n\t\tmediaField: 'featured-image',\n\t},\n};\n\nconst DEFAULT_POST_BASE = {\n\ttype: LAYOUT_LIST,\n\tsearch: '',\n\tfilters: [],\n\tpage: 1,\n\tperPage: 20,\n\tsort: {\n\t\tfield: 'date',\n\t\tdirection: 'desc',\n\t},\n\tfields: [ 'title', 'author', 'status' ],\n\tlayout: {\n\t\t...DEFAULT_CONFIG_PER_VIEW_TYPE[ LAYOUT_LIST ],\n\t},\n};\n\nexport function useDefaultViews( { postType } ) {\n\tconst labels = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getPostType } = select( coreStore );\n\t\t\treturn getPostType( postType )?.labels;\n\t\t},\n\t\t[ postType ]\n\t);\n\treturn useMemo( () => {\n\t\treturn {\n\t\t\t[ postType ]: [\n\t\t\t\t{\n\t\t\t\t\ttitle: labels?.all_items || __( 'All items' ),\n\t\t\t\t\tslug: 'all',\n\t\t\t\t\ticon: pages,\n\t\t\t\t\tview: DEFAULT_POST_BASE,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: __( 'Published' ),\n\t\t\t\t\tslug: 'published',\n\t\t\t\t\ticon: published,\n\t\t\t\t\tview: {\n\t\t\t\t\t\t...DEFAULT_POST_BASE,\n\t\t\t\t\t\tfilters: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfield: 'status',\n\t\t\t\t\t\t\t\toperator: OPERATOR_IS_ANY,\n\t\t\t\t\t\t\t\tvalue: 'publish',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: __( 'Scheduled' ),\n\t\t\t\t\tslug: 'future',\n\t\t\t\t\ticon: scheduled,\n\t\t\t\t\tview: {\n\t\t\t\t\t\t...DEFAULT_POST_BASE,\n\t\t\t\t\t\tfilters: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfield: 'status',\n\t\t\t\t\t\t\t\toperator: OPERATOR_IS_ANY,\n\t\t\t\t\t\t\t\tvalue: 'future',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: __( 'Drafts' ),\n\t\t\t\t\tslug: 'drafts',\n\t\t\t\t\ticon: drafts,\n\t\t\t\t\tview: {\n\t\t\t\t\t\t...DEFAULT_POST_BASE,\n\t\t\t\t\t\tfilters: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfield: 'status',\n\t\t\t\t\t\t\t\toperator: OPERATOR_IS_ANY,\n\t\t\t\t\t\t\t\tvalue: 'draft',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: __( 'Pending' ),\n\t\t\t\t\tslug: 'pending',\n\t\t\t\t\ticon: pending,\n\t\t\t\t\tview: {\n\t\t\t\t\t\t...DEFAULT_POST_BASE,\n\t\t\t\t\t\tfilters: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfield: 'status',\n\t\t\t\t\t\t\t\toperator: OPERATOR_IS_ANY,\n\t\t\t\t\t\t\t\tvalue: 'pending',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: __( 'Private' ),\n\t\t\t\t\tslug: 'private',\n\t\t\t\t\ticon: notAllowed,\n\t\t\t\t\tview: {\n\t\t\t\t\t\t...DEFAULT_POST_BASE,\n\t\t\t\t\t\tfilters: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfield: 'status',\n\t\t\t\t\t\t\t\toperator: OPERATOR_IS_ANY,\n\t\t\t\t\t\t\t\tvalue: 'private',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: __( 'Trash' ),\n\t\t\t\t\tslug: 'trash',\n\t\t\t\t\ticon: trash,\n\t\t\t\t\tview: {\n\t\t\t\t\t\t...DEFAULT_POST_BASE,\n\t\t\t\t\t\tfilters: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfield: 'status',\n\t\t\t\t\t\t\t\toperator: OPERATOR_IS_ANY,\n\t\t\t\t\t\t\t\tvalue: 'trash',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\t}, [ labels, postType ] );\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AASA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAKA,IAAAK,UAAA,GAAAL,OAAA;AArBA;AACA;AACA;;AAgBA;AACA;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ACzBC,KAAK,EAAE;UACR,CAAC;QAEH;MACD,CAAC,EACD;QACCV,KAAK,EAAE,IAAAE,QAAE,EAAE,OAAQ,CAAC;QACpBC,IAAI,EAAE,OAAO;QACbC,IAAI,EAAEW,YAAK;QACXT,IAAI,EAAE;UACL,GAAGzB,iBAAiB;UACpBG,OAAO,EAAE,CACR;YACCI,KAAK,EAAE,QAAQ;YACfoB,QAAQ,EAAEC,0BAAe;YACzBC,KAAK,EAAE;UACR,CAAC;QAEH;MACD,CAAC;IAEH,CAAC;EACF,CAAC,EAAE,CAAEhB,MAAM,EAAED,QAAQ,CAAG,CAAC;AAC1B","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_icons","_data","_coreData","_element","_constants","defaultLayouts","exports","LAYOUT_TABLE","layout","primaryField","styles","width","title","maxWidth","LAYOUT_GRID","mediaField","LAYOUT_LIST","DEFAULT_POST_BASE","type","search","filters","page","perPage","sort","field","direction","fields","useDefaultViews","postType","labels","useSelect","select","getPostType","coreStore","useMemo","all_items","__","slug","icon","pages","view","published","operator","OPERATOR_IS_ANY","value","scheduled","drafts","pending","notAllowed","trash"],"sources":["@wordpress/edit-site/src/components/sidebar-dataviews/default-views.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nimport {\n\ttrash,\n\tpages,\n\tdrafts,\n\tpublished,\n\tscheduled,\n\tpending,\n\tnotAllowed,\n} from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tLAYOUT_LIST,\n\tLAYOUT_TABLE,\n\tLAYOUT_GRID,\n\tOPERATOR_IS_ANY,\n} from '../../utils/constants';\n\nexport const defaultLayouts = {\n\t[ LAYOUT_TABLE ]: {\n\t\tlayout: {\n\t\t\tprimaryField: 'title',\n\t\t\tstyles: {\n\t\t\t\t'featured-image': {\n\t\t\t\t\twidth: '1%',\n\t\t\t\t},\n\t\t\t\ttitle: {\n\t\t\t\t\tmaxWidth: 300,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n\t[ LAYOUT_GRID ]: {\n\t\tlayout: {\n\t\t\tmediaField: 'featured-image',\n\t\t\tprimaryField: 'title',\n\t\t},\n\t},\n\t[ LAYOUT_LIST ]: {\n\t\tlayout: {\n\t\t\tprimaryField: 'title',\n\t\t\tmediaField: 'featured-image',\n\t\t},\n\t},\n};\n\nconst DEFAULT_POST_BASE = {\n\ttype: LAYOUT_LIST,\n\tsearch: '',\n\tfilters: [],\n\tpage: 1,\n\tperPage: 20,\n\tsort: {\n\t\tfield: 'date',\n\t\tdirection: 'desc',\n\t},\n\tfields: [ 'title', 'author', 'status' ],\n\tlayout: defaultLayouts[ LAYOUT_LIST ].layout,\n};\n\nexport function useDefaultViews( { postType } ) {\n\tconst labels = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getPostType } = select( coreStore );\n\t\t\treturn getPostType( postType )?.labels;\n\t\t},\n\t\t[ postType ]\n\t);\n\treturn useMemo( () => {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttitle: labels?.all_items || __( 'All items' ),\n\t\t\t\tslug: 'all',\n\t\t\t\ticon: pages,\n\t\t\t\tview: DEFAULT_POST_BASE,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: __( 'Published' ),\n\t\t\t\tslug: 'published',\n\t\t\t\ticon: published,\n\t\t\t\tview: {\n\t\t\t\t\t...DEFAULT_POST_BASE,\n\t\t\t\t\tfilters: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfield: 'status',\n\t\t\t\t\t\t\toperator: OPERATOR_IS_ANY,\n\t\t\t\t\t\t\tvalue: 'publish',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: __( 'Scheduled' ),\n\t\t\t\tslug: 'future',\n\t\t\t\ticon: scheduled,\n\t\t\t\tview: {\n\t\t\t\t\t...DEFAULT_POST_BASE,\n\t\t\t\t\tfilters: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfield: 'status',\n\t\t\t\t\t\t\toperator: OPERATOR_IS_ANY,\n\t\t\t\t\t\t\tvalue: 'future',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: __( 'Drafts' ),\n\t\t\t\tslug: 'drafts',\n\t\t\t\ticon: drafts,\n\t\t\t\tview: {\n\t\t\t\t\t...DEFAULT_POST_BASE,\n\t\t\t\t\tfilters: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfield: 'status',\n\t\t\t\t\t\t\toperator: OPERATOR_IS_ANY,\n\t\t\t\t\t\t\tvalue: 'draft',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: __( 'Pending' ),\n\t\t\t\tslug: 'pending',\n\t\t\t\ticon: pending,\n\t\t\t\tview: {\n\t\t\t\t\t...DEFAULT_POST_BASE,\n\t\t\t\t\tfilters: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfield: 'status',\n\t\t\t\t\t\t\toperator: OPERATOR_IS_ANY,\n\t\t\t\t\t\t\tvalue: 'pending',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: __( 'Private' ),\n\t\t\t\tslug: 'private',\n\t\t\t\ticon: notAllowed,\n\t\t\t\tview: {\n\t\t\t\t\t...DEFAULT_POST_BASE,\n\t\t\t\t\tfilters: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfield: 'status',\n\t\t\t\t\t\t\toperator: OPERATOR_IS_ANY,\n\t\t\t\t\t\t\tvalue: 'private',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: __( 'Trash' ),\n\t\t\t\tslug: 'trash',\n\t\t\t\ticon: trash,\n\t\t\t\tview: {\n\t\t\t\t\t...DEFAULT_POST_BASE,\n\t\t\t\t\ttype: LAYOUT_TABLE,\n\t\t\t\t\tlayout: defaultLayouts[ LAYOUT_TABLE ].layout,\n\t\t\t\t\tfilters: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfield: 'status',\n\t\t\t\t\t\t\toperator: OPERATOR_IS_ANY,\n\t\t\t\t\t\t\tvalue: 'trash',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t}, [ labels ] );\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AASA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAKA,IAAAK,UAAA,GAAAL,OAAA;AArBA;AACA;AACA;;AAgBA;AACA;AACA;;AAQO,MAAMM,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG;EAC7B,CAAEE,uBAAY,GAAI;IACjBC,MAAM,EAAE;MACPC,YAAY,EAAE,OAAO;MACrBC,MAAM,EAAE;QACP,gBAAgB,EAAE;UACjBC,KAAK,EAAE;QACR,CAAC;QACDC,KAAK,EAAE;UACNC,QAAQ,EAAE;QACX;MACD;IACD;EACD,CAAC;EACD,CAAEC,sBAAW,GAAI;IAChBN,MAAM,EAAE;MACPO,UAAU,EAAE,gBAAgB;MAC5BN,YAAY,EAAE;IACf;EACD,CAAC;EACD,CAAEO,sBAAW,GAAI;IAChBR,MAAM,EAAE;MACPC,YAAY,EAAE,OAAO;MACrBM,UAAU,EAAE;IACb;EACD;AACD,CAAC;AAED,MAAME,iBAAiB,GAAG;EACzBC,IAAI,EAAEF,sBAAW;EACjBG,MAAM,EAAE,EAAE;EACVC,OAAO,EAAE,EAAE;EACXC,IAAI,EAAE,CAA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M,CAAG,CAAC;AAChB","ignoreList":[]}
@@ -31,7 +31,7 @@ function DataViewsSidebarContent() {
31
31
  isCustom = 'false'
32
32
  }
33
33
  } = useLocation();
34
- const DEFAULT_VIEWS = (0, _defaultViews.useDefaultViews)({
34
+ const defaultViews = (0, _defaultViews.useDefaultViews)({
35
35
  postType
36
36
  });
37
37
  if (!postType) {
@@ -40,7 +40,7 @@ function DataViewsSidebarContent() {
40
40
  const isCustomBoolean = isCustom === 'true';
41
41
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
42
42
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalItemGroup, {
43
- children: DEFAULT_VIEWS[postType].map(dataview => {
43
+ children: defaultViews.map(dataview => {
44
44
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_dataviewItem.default, {
45
45
  slug: dataview.slug,
46
46
  title: dataview.title,
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_router","_defaultViews","_lockUnlock","_dataviewItem","_interopRequireDefault","_customDataviewsList","_jsxRuntime","useLocation","unlock","routerPrivateApis","DataViewsSidebarContent","params","postType","activeView","isCustom","DEFAULT_VIEWS","useDefaultViews","isCustomBoolean","jsxs","Fragment","children","jsx","__experimentalItemGroup","map","dataview","default","slug","title","icon","type","view","isActive","window","__experimentalCustomViews"],"sources":["@wordpress/edit-site/src/components/sidebar-dataviews/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { useDefaultViews } from './default-views';\nimport { unlock } from '../../lock-unlock';\nconst { useLocation } = unlock( routerPrivateApis );\nimport DataViewItem from './dataview-item';\nimport CustomDataViewsList from './custom-dataviews-list';\n\nexport default function DataViewsSidebarContent() {\n\tconst {\n\t\tparams: { postType, activeView = 'all', isCustom = 'false' },\n\t} = useLocation();\n\tconst DEFAULT_VIEWS = useDefaultViews( { postType } );\n\tif ( ! postType ) {\n\t\treturn null;\n\t}\n\tconst isCustomBoolean = isCustom === 'true';\n\n\treturn (\n\t\t<>\n\t\t\t<ItemGroup>\n\t\t\t\t{ DEFAULT_VIEWS[ postType ].map( ( dataview ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<DataViewItem\n\t\t\t\t\t\t\tkey={ dataview.slug }\n\t\t\t\t\t\t\tslug={ dataview.slug }\n\t\t\t\t\t\t\ttitle={ dataview.title }\n\t\t\t\t\t\t\ticon={ dataview.icon }\n\t\t\t\t\t\t\ttype={ dataview.view.type }\n\t\t\t\t\t\t\tisActive={\n\t\t\t\t\t\t\t\t! isCustomBoolean &&\n\t\t\t\t\t\t\t\tdataview.slug === activeView\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tisCustom={ false }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</ItemGroup>\n\t\t\t{ window?.__experimentalCustomViews && (\n\t\t\t\t<CustomDataViewsList\n\t\t\t\t\tactiveView={ activeView }\n\t\t\t\t\ttype={ postType }\n\t\t\t\t\tisCustom\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAKA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAEA,IAAAI,aAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAD,sBAAA,CAAAL,OAAA;AAA0D,IAAAO,WAAA,GAAAP,OAAA;AAb1D;AACA;AACA;;AAIA;AACA;AACA;;AAGA,MAAM;EAAEQ;AAAY,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAIpC,SAASC,uBAAuBA,CAAA,EAAG;EACjD,MAAM;IACLC,MAAM,EAAE;MAAEC,QAAQ;MAAEC,UAAU,GAAG,KAAK;MAAEC,QAAQ,GAAG;IAAQ;EAC5D,CAAC,GAAGP,WAAW,CAAC,CAAC;EACjB,MAAMQ,aAAa,GAAG,IAAAC,6BAAe,EAAE;IAAEJ;EAAS,CAAE,CAAC;EACrD,IAAK,CAAEA,QAAQ,EAAG;IACjB,OAAO,IAAI;EACZ;EACA,MAAMK,eAAe,GAAGH,QAAQ,KAAK,MAAM;EAE3C,oBACC,IAAAR,WAAA,CAAAY,IAAA,EAAAZ,WAAA,CAAAa,QAAA;IAAAC,QAAA,gBACC,IAAAd,WAAA,CAAAe,GAAA,EAACvB,WAAA,CAAAwB,uBAAS;MAAAF,QAAA,EACPL,aAAa,CAAEH,QAAQ,CAAE,CAACW,GAAG,CAAIC,QAAQ,IAAM;QAChD,oBACC,IAAAlB,WAAA,CAAAe,GAAA,EAAClB,aAAA,CAAAsB,OAAY;UAEZC,IAAI,EAAGF,QAAQ,CAACE,IAAM;UACtBC,KAAK,EAAGH,QAAQ,CAACG,KAAO;UACxBC,IAAI,EAAGJ,QAAQ,CAACI,IAAM;UACtBC,IAAI,EAAGL,QAAQ,CAACM,IAAI,CAACD,IAAM;UAC3BE,QAAQ,EACP,CAAEd,eAAe,IACjBO,QAAQ,CAACE,IAAI,KAAKb,UAClB;UACDC,QAAQ,EAAG;QAAO,GATZU,QAAQ,CAACE,IAUf,CAAC;MAEJ,CAAE;IAAC,CACO,CAAC,EACVM,MAAM,EAAEC,yBAAyB,iBAClC,IAAA3B,WAAA,CAAAe,GAAA,EAAChB,oBAAA,CAAAoB,OAAmB;MACnBZ,UAAU,EAAGA,UAAY;MACzBgB,IAAI,EAAGjB,QAAU;MACjBE,QAAQ;IAAA,CACR,CACD;EAAA,CACA,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_router","_defaultViews","_lockUnlock","_dataviewItem","_interopRequireDefault","_customDataviewsList","_jsxRuntime","useLocation","unlock","routerPrivateApis","DataViewsSidebarContent","params","postType","activeView","isCustom","defaultViews","useDefaultViews","isCustomBoolean","jsxs","Fragment","children","jsx","__experimentalItemGroup","map","dataview","default","slug","title","icon","type","view","isActive","window","__experimentalCustomViews"],"sources":["@wordpress/edit-site/src/components/sidebar-dataviews/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { useDefaultViews } from './default-views';\nimport { unlock } from '../../lock-unlock';\nimport DataViewItem from './dataview-item';\nimport CustomDataViewsList from './custom-dataviews-list';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function DataViewsSidebarContent() {\n\tconst {\n\t\tparams: { postType, activeView = 'all', isCustom = 'false' },\n\t} = useLocation();\n\tconst defaultViews = useDefaultViews( { postType } );\n\tif ( ! postType ) {\n\t\treturn null;\n\t}\n\tconst isCustomBoolean = isCustom === 'true';\n\n\treturn (\n\t\t<>\n\t\t\t<ItemGroup>\n\t\t\t\t{ defaultViews.map( ( dataview ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<DataViewItem\n\t\t\t\t\t\t\tkey={ dataview.slug }\n\t\t\t\t\t\t\tslug={ dataview.slug }\n\t\t\t\t\t\t\ttitle={ dataview.title }\n\t\t\t\t\t\t\ticon={ dataview.icon }\n\t\t\t\t\t\t\ttype={ dataview.view.type }\n\t\t\t\t\t\t\tisActive={\n\t\t\t\t\t\t\t\t! isCustomBoolean &&\n\t\t\t\t\t\t\t\tdataview.slug === activeView\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tisCustom={ false }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</ItemGroup>\n\t\t\t{ window?.__experimentalCustomViews && (\n\t\t\t\t<CustomDataViewsList\n\t\t\t\t\tactiveView={ activeView }\n\t\t\t\t\ttype={ postType }\n\t\t\t\t\tisCustom\n\t\t\t\t/>\n\t\t\t) }\n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,CAACE,IAAI,KAAKb,UAClB;UACDC,QAAQ,EAAG;QAAO,GATZU,QAAQ,CAACE,IAUf,CAAC;MAEJ,CAAE;IAAC,CACO,CAAC,EACVM,MAAM,EAAEC,yBAAyB,iBAClC,IAAA3B,WAAA,CAAAe,GAAA,EAAChB,oBAAA,CAAAoB,OAAmB;MACnBZ,UAAU,EAAGA,UAAY;MACzBgB,IAAI,EAAGjB,QAAU;MACjBE,QAAQ;IAAA,CACR,CACD;EAAA,CACA,CAAC;AAEL","ignoreList":[]}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = SidebarNavigationScreenGlobalStylesContent;
8
+ var _i18n = require("@wordpress/i18n");
9
+ var _data = require("@wordpress/data");
10
+ var _components = require("@wordpress/components");
11
+ var _blockEditor = require("@wordpress/block-editor");
12
+ var _styleVariationsContainer = _interopRequireDefault(require("../global-styles/style-variations-container"));
13
+ var _lockUnlock = require("../../lock-unlock");
14
+ var _store = require("../../store");
15
+ var _variationsColor = _interopRequireDefault(require("../global-styles/variations/variations-color"));
16
+ var _variationsTypography = _interopRequireDefault(require("../global-styles/variations/variations-typography"));
17
+ var _jsxRuntime = require("react/jsx-runtime");
18
+ /**
19
+ * WordPress dependencies
20
+ */
21
+
22
+ /**
23
+ * Internal dependencies
24
+ */
25
+
26
+ const noop = () => {};
27
+ function SidebarNavigationScreenGlobalStylesContent() {
28
+ const {
29
+ storedSettings
30
+ } = (0, _data.useSelect)(select => {
31
+ const {
32
+ getSettings
33
+ } = (0, _lockUnlock.unlock)(select(_store.store));
34
+ return {
35
+ storedSettings: getSettings()
36
+ };
37
+ }, []);
38
+ const gap = 3;
39
+
40
+ // Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are
41
+ // loaded. This is necessary because the Iframe component waits until
42
+ // the block editor store's `__internalIsInitialized` is true before
43
+ // rendering the iframe. Without this, the iframe previews will not render
44
+ // in mobile viewport sizes, where the editor canvas is hidden.
45
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.BlockEditorProvider, {
46
+ settings: storedSettings,
47
+ onChange: noop,
48
+ onInput: noop,
49
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalVStack, {
50
+ spacing: 10,
51
+ className: "edit-site-global-styles-variation-container",
52
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styleVariationsContainer.default, {
53
+ gap: gap
54
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_variationsColor.default, {
55
+ title: (0, _i18n.__)('Palettes'),
56
+ gap: gap
57
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_variationsTypography.default, {
58
+ title: (0, _i18n.__)('Typography'),
59
+ gap: gap
60
+ })]
61
+ })
62
+ });
63
+ }
64
+ //# sourceMappingURL=content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_i18n","require","_data","_components","_blockEditor","_styleVariationsContainer","_interopRequireDefault","_lockUnlock","_store","_variationsColor","_variationsTypography","_jsxRuntime","noop","SidebarNavigationScreenGlobalStylesContent","storedSettings","useSelect","select","getSettings","unlock","editSiteStore","gap","jsx","BlockEditorProvider","settings","onChange","onInput","children","jsxs","__experimentalVStack","spacing","className","default","title","__"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-global-styles/content.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { BlockEditorProvider } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport StyleVariationsContainer from '../global-styles/style-variations-container';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport ColorVariations from '../global-styles/variations/variations-color';\nimport TypographyVariations from '../global-styles/variations/variations-typography';\n\nconst noop = () => {};\n\nexport default function SidebarNavigationScreenGlobalStylesContent() {\n\tconst { storedSettings } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\tstoredSettings: getSettings(),\n\t\t};\n\t}, [] );\n\n\tconst gap = 3;\n\n\t// Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are\n\t// loaded. This is necessary because the Iframe component waits until\n\t// the block editor store's `__internalIsInitialized` is true before\n\t// rendering the iframe. Without this, the iframe previews will not render\n\t// in mobile viewport sizes, where the editor canvas is hidden.\n\treturn (\n\t\t<BlockEditorProvider\n\t\t\tsettings={ storedSettings }\n\t\t\tonChange={ noop }\n\t\t\tonInput={ noop }\n\t\t>\n\t\t\t<VStack\n\t\t\t\tspacing={ 10 }\n\t\t\t\tclassName=\"edit-site-global-styles-variation-container\"\n\t\t\t>\n\t\t\t\t<StyleVariationsContainer gap={ gap } />\n\t\t\t\t<ColorVariations title={ __( 'Palettes' ) } gap={ gap } />\n\t\t\t\t<TypographyVariations\n\t\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\t\tgap={ gap }\n\t\t\t\t/>\n\t\t\t</VStack>\n\t\t</BlockEditorProvider>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,yBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,gBAAA,GAAAH,sBAAA,CAAAL,OAAA;AACA,IAAAS,qBAAA,GAAAJ,sBAAA,CAAAL,OAAA;AAAqF,IAAAU,WAAA,GAAAV,OAAA;AAfrF;AACA;AACA;;AAMA;AACA;AACA;;AAOA,MAAMW,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAEN,SAASC,0CAA0CA,CAAA,EAAG;EACpE,MAAM;IAAEC;EAAe,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACnD,MAAM;MAAEC;IAAY,CAAC,GAAG,IAAAC,kBAAM,EAAEF,MAAM,CAAEG,YAAc,CAAE,CAAC;IAEzD,OAAO;MACNL,cAAc,EAAEG,WAAW,CAAC;IAC7B,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMG,GAAG,GAAG,CAAC;;EAEb;EACA;EACA;EACA;EACA;EACA,oBACC,IAAAT,WAAA,CAAAU,GAAA,EAACjB,YAAA,CAAAkB,mBAAmB;IACnBC,QAAQ,EAAGT,cAAgB;IAC3BU,QAAQ,EAAGZ,IAAM;IACjBa,OAAO,EAAGb,IAAM;IAAAc,QAAA,eAEhB,IAAAf,WAAA,CAAAgB,IAAA,EAACxB,WAAA,CAAAyB,oBAAM;MACNC,OAAO,EAAG,EAAI;MACdC,SAAS,EAAC,6CAA6C;MAAAJ,QAAA,gBAEvD,IAAAf,WAAA,CAAAU,GAAA,EAAChB,yBAAA,CAAA0B,OAAwB;QAACX,GAAG,EAAGA;MAAK,CAAE,CAAC,eACxC,IAAAT,WAAA,CAAAU,GAAA,EAACZ,gBAAA,CAAAsB,OAAe;QAACC,KAAK,EAAG,IAAAC,QAAE,EAAE,UAAW,CAAG;QAACb,GAAG,EAAGA;MAAK,CAAE,CAAC,eAC1D,IAAAT,WAAA,CAAAU,GAAA,EAACX,qBAAA,CAAAqB,OAAoB;QACpBC,KAAK,EAAG,IAAAC,QAAE,EAAE,YAAa,CAAG;QAC5Bb,GAAG,EAAGA;MAAK,CACX,CAAC;IAAA,CACK;EAAC,CACW,CAAC;AAExB","ignoreList":[]}
@@ -10,14 +10,11 @@ var _i18n = require("@wordpress/i18n");
10
10
  var _icons = require("@wordpress/icons");
11
11
  var _data = require("@wordpress/data");
12
12
  var _coreData = require("@wordpress/core-data");
13
- var _components = require("@wordpress/components");
14
13
  var _compose = require("@wordpress/compose");
15
- var _blockEditor = require("@wordpress/block-editor");
16
14
  var _element = require("@wordpress/element");
17
15
  var _editor = require("@wordpress/editor");
18
16
  var _preferences = require("@wordpress/preferences");
19
17
  var _sidebarNavigationScreen = _interopRequireDefault(require("../sidebar-navigation-screen"));
20
- var _styleVariationsContainer = _interopRequireDefault(require("../global-styles/style-variations-container"));
21
18
  var _lockUnlock = require("../../lock-unlock");
22
19
  var _store = require("../../store");
23
20
  var _sidebarButton = _interopRequireDefault(require("../sidebar-button"));
@@ -25,9 +22,7 @@ var _sidebarNavigationItem = _interopRequireDefault(require("../sidebar-navigati
25
22
  var _styleBook = _interopRequireDefault(require("../style-book"));
26
23
  var _useGlobalStylesRevisions = _interopRequireDefault(require("../global-styles/screen-revisions/use-global-styles-revisions"));
27
24
  var _sidebarNavigationScreenDetailsFooter = _interopRequireDefault(require("../sidebar-navigation-screen-details-footer"));
28
- var _variationsColor = _interopRequireDefault(require("../global-styles/variations/variations-color"));
29
- var _variationsTypography = _interopRequireDefault(require("../global-styles/variations/variations-typography"));
30
- var _useThemeStyleVariationsByProperty = require("../../hooks/use-theme-style-variations/use-theme-style-variations-by-property");
25
+ var _content = _interopRequireDefault(require("./content"));
31
26
  var _jsxRuntime = require("react/jsx-runtime");
32
27
  /**
33
28
  * WordPress dependencies
@@ -37,7 +32,6 @@ var _jsxRuntime = require("react/jsx-runtime");
37
32
  * Internal dependencies
38
33
  */
39
34
 
40
- const noop = () => {};
41
35
  function SidebarNavigationItemGlobalStyles(props) {
42
36
  const {
43
37
  openGeneralSidebar
@@ -65,45 +59,6 @@ function SidebarNavigationItemGlobalStyles(props) {
65
59
  }
66
60
  });
67
61
  }
68
- function SidebarNavigationScreenGlobalStylesContent() {
69
- const {
70
- storedSettings
71
- } = (0, _data.useSelect)(select => {
72
- const {
73
- getSettings
74
- } = (0, _lockUnlock.unlock)(select(_store.store));
75
- return {
76
- storedSettings: getSettings()
77
- };
78
- }, []);
79
- const colorVariations = (0, _useThemeStyleVariationsByProperty.useCurrentMergeThemeStyleVariationsWithUserConfig)(['color']);
80
- const typographyVariations = (0, _useThemeStyleVariationsByProperty.useCurrentMergeThemeStyleVariationsWithUserConfig)(['typography']);
81
- const gap = 3;
82
-
83
- // Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are
84
- // loaded. This is necessary because the Iframe component waits until
85
- // the block editor store's `__internalIsInitialized` is true before
86
- // rendering the iframe. Without this, the iframe previews will not render
87
- // in mobile viewport sizes, where the editor canvas is hidden.
88
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.BlockEditorProvider, {
89
- settings: storedSettings,
90
- onChange: noop,
91
- onInput: noop,
92
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalVStack, {
93
- spacing: 10,
94
- className: "edit-site-global-styles-variation-container",
95
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styleVariationsContainer.default, {
96
- gap: gap
97
- }), colorVariations?.length && /*#__PURE__*/(0, _jsxRuntime.jsx)(_variationsColor.default, {
98
- title: (0, _i18n.__)('Palettes'),
99
- gap: gap
100
- }), typographyVariations?.length && /*#__PURE__*/(0, _jsxRuntime.jsx)(_variationsTypography.default, {
101
- title: (0, _i18n.__)('Typography'),
102
- gap: gap
103
- })]
104
- })
105
- });
106
- }
107
62
  function SidebarNavigationScreenGlobalStyles({
108
63
  backPath
109
64
  }) {
@@ -176,7 +131,7 @@ function SidebarNavigationScreenGlobalStyles({
176
131
  title: (0, _i18n.__)('Styles'),
177
132
  description: (0, _i18n.__)('Choose a different style combination for the theme styles.'),
178
133
  backPath: backPath,
179
- content: /*#__PURE__*/(0, _jsxRuntime.jsx)(SidebarNavigationScreenGlobalStylesContent, {}),
134
+ content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_content.default, {}),
180
135
  footer: shouldShowGlobalStylesFooter && /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreenDetailsFooter.default, {
181
136
  record: revisions?.[0],
182
137
  onClick: openRevisions
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_icons","_data","_coreData","_components","_compose","_blockEditor","_element","_editor","_preferences","_sidebarNavigationScreen","_interopRequireDefault","_styleVariationsContainer","_lockUnlock","_store","_sidebarButton","_sidebarNavigationItem","_styleBook","_useGlobalStylesRevisions","_sidebarNavigationScreenDetailsFooter","_variationsColor","_variationsTypography","_useThemeStyleVariationsByProperty","_jsxRuntime","noop","SidebarNavigationItemGlobalStyles","props","openGeneralSidebar","useDispatch","editSiteStore","setCanvasMode","unlock","hasGlobalStyleVariations","useSelect","select","coreStore","__experimentalGetCurrentThemeGlobalStylesVariations","length","jsx","default","params","path","uid","onClick","SidebarNavigationScreenGlobalStylesContent","storedSettings","getSettings","colorVariations","useCurrentMergeThemeStyleVariationsWithUserConfig","typographyVariations","gap","BlockEditorProvider","settings","onChange","onInput","children","jsxs","__experimentalVStack","spacing","className","title","__","SidebarNavigationScreenGlobalStyles","backPath","revisions","isLoading","isLoadingRevisions","useGlobalStylesRevisions","setIsListViewOpened","editorStore","isMobileViewport","useViewportMatch","setEditorCanvasContainerView","isViewMode","isStyleBookOpened","revisionsCount","_globalStyles$_links$","getCanvasMode","getEditorCanvasContainerView","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","undefined","_links","count","set","setPreference","preferencesStore","openGlobalStyles","useCallback","Promise","all","openStyleBook","openRevisions","hasRevisions","modifiedDateTime","modified","shouldShowGlobalStylesFooter","Fragment","description","content","footer","record","actions","icon","seen","label","isPressed","edit","enableResizing","isSelected","onSelect","showCloseButton","showTabs"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { edit, seen } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { BlockEditorProvider } from '@wordpress/block-editor';\nimport { useCallback } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport StyleVariationsContainer from '../global-styles/style-variations-container';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport StyleBook from '../style-book';\nimport useGlobalStylesRevisions from '../global-styles/screen-revisions/use-global-styles-revisions';\nimport SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';\nimport ColorVariations from '../global-styles/variations/variations-color';\nimport TypographyVariations from '../global-styles/variations/variations-typography';\nimport { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';\n\nconst noop = () => {};\n\nexport function SidebarNavigationItemGlobalStyles( props ) {\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\n\tconst hasGlobalStyleVariations = useSelect(\n\t\t( select ) =>\n\t\t\t!! select(\n\t\t\t\tcoreStore\n\t\t\t).__experimentalGetCurrentThemeGlobalStylesVariations()?.length,\n\t\t[]\n\t);\n\tif ( hasGlobalStyleVariations ) {\n\t\treturn (\n\t\t\t<SidebarNavigationItem\n\t\t\t\t{ ...props }\n\t\t\t\tparams={ { path: '/wp_global_styles' } }\n\t\t\t\tuid=\"global-styles-navigation-item\"\n\t\t\t/>\n\t\t);\n\t}\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\t{ ...props }\n\t\t\tonClick={ () => {\n\t\t\t\t// Switch to edit mode.\n\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t// Open global styles sidebar.\n\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction SidebarNavigationScreenGlobalStylesContent() {\n\tconst { storedSettings } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\tstoredSettings: getSettings(),\n\t\t};\n\t}, [] );\n\n\tconst colorVariations = useCurrentMergeThemeStyleVariationsWithUserConfig( [\n\t\t'color',\n\t] );\n\tconst typographyVariations =\n\t\tuseCurrentMergeThemeStyleVariationsWithUserConfig( [ 'typography' ] );\n\n\tconst gap = 3;\n\n\t// Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are\n\t// loaded. This is necessary because the Iframe component waits until\n\t// the block editor store's `__internalIsInitialized` is true before\n\t// rendering the iframe. Without this, the iframe previews will not render\n\t// in mobile viewport sizes, where the editor canvas is hidden.\n\treturn (\n\t\t<BlockEditorProvider\n\t\t\tsettings={ storedSettings }\n\t\t\tonChange={ noop }\n\t\t\tonInput={ noop }\n\t\t>\n\t\t\t<VStack\n\t\t\t\tspacing={ 10 }\n\t\t\t\tclassName=\"edit-site-global-styles-variation-container\"\n\t\t\t>\n\t\t\t\t<StyleVariationsContainer gap={ gap } />\n\t\t\t\t{ colorVariations?.length && (\n\t\t\t\t\t<ColorVariations title={ __( 'Palettes' ) } gap={ gap } />\n\t\t\t\t) }\n\t\t\t\t{ typographyVariations?.length && (\n\t\t\t\t\t<TypographyVariations\n\t\t\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\t\t\tgap={ gap }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</VStack>\n\t\t</BlockEditorProvider>\n\t);\n}\n\nexport default function SidebarNavigationScreenGlobalStyles( { backPath } ) {\n\tconst { revisions, isLoading: isLoadingRevisions } =\n\t\tuseGlobalStylesRevisions();\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { setCanvasMode, setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { isViewMode, isStyleBookOpened, revisionsCount } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCanvasMode, getEditorCanvasContainerView } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\n\t\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\t\tconst globalStyles = globalStylesId\n\t\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t\t: undefined;\n\t\t\treturn {\n\t\t\t\tisViewMode: 'view' === getCanvasMode(),\n\t\t\t\tisStyleBookOpened:\n\t\t\t\t\t'style-book' === getEditorCanvasContainerView(),\n\t\t\t\trevisionsCount:\n\t\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ??\n\t\t\t\t\t0,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\n\tconst openGlobalStyles = useCallback( async () => {\n\t\treturn Promise.all( [\n\t\t\tsetPreference( 'core', 'distractionFree', false ),\n\t\t\tsetCanvasMode( 'edit' ),\n\t\t\topenGeneralSidebar( 'edit-site/global-styles' ),\n\t\t] );\n\t}, [ setCanvasMode, openGeneralSidebar, setPreference ] );\n\n\tconst openStyleBook = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the Style Book once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. This ensures that\n\t\t// the Style Book is not prematurely closed.\n\t\tsetEditorCanvasContainerView( 'style-book' );\n\t\tsetIsListViewOpened( false );\n\t}, [\n\t\topenGlobalStyles,\n\t\tsetEditorCanvasContainerView,\n\t\tsetIsListViewOpened,\n\t] );\n\n\tconst openRevisions = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the global styles revisions once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. The global styles UI is responsible\n\t\t// for redirecting to the revisions screen once the editor canvas container\n\t\t// has been set to 'global-styles-revisions'.\n\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t}, [ openGlobalStyles, setEditorCanvasContainerView ] );\n\n\t// If there are no revisions, do not render a footer.\n\tconst hasRevisions = revisionsCount > 0;\n\tconst modifiedDateTime = revisions?.[ 0 ]?.modified;\n\tconst shouldShowGlobalStylesFooter =\n\t\thasRevisions && ! isLoadingRevisions && modifiedDateTime;\n\n\treturn (\n\t\t<>\n\t\t\t<SidebarNavigationScreen\n\t\t\t\ttitle={ __( 'Styles' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Choose a different style combination for the theme styles.'\n\t\t\t\t) }\n\t\t\t\tbackPath={ backPath }\n\t\t\t\tcontent={ <SidebarNavigationScreenGlobalStylesContent /> }\n\t\t\t\tfooter={\n\t\t\t\t\tshouldShowGlobalStylesFooter && (\n\t\t\t\t\t\t<SidebarNavigationScreenDetailsFooter\n\t\t\t\t\t\t\trecord={ revisions?.[ 0 ] }\n\t\t\t\t\t\t\tonClick={ openRevisions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isMobileViewport && (\n\t\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\t\ticon={ seen }\n\t\t\t\t\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t\t\t\t\t\t\t! isStyleBookOpened\n\t\t\t\t\t\t\t\t\t\t\t? 'style-book'\n\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tisPressed={ isStyleBookOpened }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ edit }\n\t\t\t\t\t\t\tlabel={ __( 'Edit styles' ) }\n\t\t\t\t\t\t\tonClick={ async () => await openGlobalStyles() }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ isStyleBookOpened && ! isMobileViewport && isViewMode && (\n\t\t\t\t<StyleBook\n\t\t\t\t\tenableResizing={ false }\n\t\t\t\t\tisSelected={ () => false }\n\t\t\t\t\tonClick={ openStyleBook }\n\t\t\t\t\tonSelect={ openStyleBook }\n\t\t\t\t\tshowCloseButton={ false }\n\t\t\t\t\tshowTabs={ false }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AAKA,IAAAU,wBAAA,GAAAC,sBAAA,CAAAX,OAAA;AACA,IAAAY,yBAAA,GAAAD,sBAAA,CAAAX,OAAA;AACA,IAAAa,WAAA,GAAAb,OAAA;AACA,IAAAc,MAAA,GAAAd,OAAA;AACA,IAAAe,cAAA,GAAAJ,sBAAA,CAAAX,OAAA;AACA,IAAAgB,sBAAA,GAAAL,sBAAA,CAAAX,OAAA;AACA,IAAAiB,UAAA,GAAAN,sBAAA,CAAAX,OAAA;AACA,IAAAkB,yBAAA,GAAAP,sBAAA,CAAAX,OAAA;AACA,IAAAmB,qCAAA,GAAAR,sBAAA,CAAAX,OAAA;AACA,IAAAoB,gBAAA,GAAAT,sBAAA,CAAAX,OAAA;AACA,IAAA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0C,IAAE,CAAG;MAC1D0D,MAAM,EACLJ,4BAA4B,iBAC3B,IAAA3E,WAAA,CAAAe,GAAA,EAACnB,qCAAA,CAAAoB,OAAoC;QACpCgE,MAAM,EAAGvC,SAAS,GAAI,CAAC,CAAI;QAC3BrB,OAAO,EAAGmD;MAAe,CACzB,CAEF;MACDU,OAAO,eACN,IAAAjF,WAAA,CAAAiC,IAAA,EAAAjC,WAAA,CAAA4E,QAAA;QAAA5C,QAAA,GACG,CAAEe,gBAAgB,iBACnB,IAAA/C,WAAA,CAAAe,GAAA,EAACvB,cAAA,CAAAwB,OAAa;UACbkE,IAAI,EAAGC,WAAM;UACbC,KAAK,EAAG,IAAA9C,QAAE,EAAE,YAAa,CAAG;UAC5BlB,OAAO,EAAGA,CAAA,KACT6B,4BAA4B,CAC3B,CAAEE,iBAAiB,GAChB,YAAY,GACZS,SACJ,CACA;UACDyB,SAAS,EAAGlC;QAAmB,CAC/B,CACD,eACD,IAAAnD,WAAA,CAAAe,GAAA,EAACvB,cAAA,CAAAwB,OAAa;UACbkE,IAAI,EAAGI,WAAM;UACbF,KAAK,EAAG,IAAA9C,QAAE,EAAE,aAAc,CAAG;UAC7BlB,OAAO,EAAG,MAAAA,CAAA,KAAY,MAAM8C,gBAAgB,CAAC;QAAG,CAChD,CAAC;MAAA,CACD;IACF,CACD,CAAC,EACAf,iBAAiB,IAAI,CAAEJ,gBAAgB,IAAIG,UAAU,iBACtD,IAAAlD,WAAA,CAAAe,GAAA,EAACrB,UAAA,CAAAsB,OAAS;MACTuE,cAAc,EAAG,KAAO;MACxBC,UAAU,EAAGA,CAAA,KAAM,KAAO;MAC1BpE,OAAO,EAAGkD,aAAe;MACzBmB,QAAQ,EAAGnB,aAAe;MAC1BoB,eAAe,EAAG,KAAO;MACzBC,QAAQ,EAAG;IAAO,CAClB,CACD;EAAA,CACA,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_icons","_data","_coreData","_compose","_element","_editor","_preferences","_sidebarNavigationScreen","_interopRequireDefault","_lockUnlock","_store","_sidebarButton","_sidebarNavigationItem","_styleBook","_useGlobalStylesRevisions","_sidebarNavigationScreenDetailsFooter","_content","_jsxRuntime","SidebarNavigationItemGlobalStyles","props","openGeneralSidebar","useDispatch","editSiteStore","setCanvasMode","unlock","hasGlobalStyleVariations","useSelect","select","coreStore","__experimentalGetCurrentThemeGlobalStylesVariations","length","jsx","default","params","path","uid","onClick","SidebarNavigationScreenGlobalStyles","backPath","revisions","isLoading","isLoadingRevisions","useGlobalStylesRevisions","setIsListViewOpened","editorStore","isMobileViewport","useViewportMatch","setEditorCanvasContainerView","isViewMode","isStyleBookOpened","revisionsCount","_globalStyles$_links$","getCanvasMode","getEditorCanvasContainerView","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","undefined","_links","count","set","setPreference","preferencesStore","openGlobalStyles","useCallback","Promise","all","openStyleBook","openRevisions","hasRevisions","modifiedDateTime","modified","shouldShowGlobalStylesFooter","jsxs","Fragment","children","title","__","description","content","footer","record","actions","icon","seen","label","isPressed","edit","enableResizing","isSelected","onSelect","showCloseButton","showTabs"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { edit, seen } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useCallback } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport StyleBook from '../style-book';\nimport useGlobalStylesRevisions from '../global-styles/screen-revisions/use-global-styles-revisions';\nimport SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';\nimport SidebarNavigationScreenGlobalStylesContent from './content';\n\nexport function SidebarNavigationItemGlobalStyles( props ) {\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\n\tconst hasGlobalStyleVariations = useSelect(\n\t\t( select ) =>\n\t\t\t!! select(\n\t\t\t\tcoreStore\n\t\t\t).__experimentalGetCurrentThemeGlobalStylesVariations()?.length,\n\t\t[]\n\t);\n\tif ( hasGlobalStyleVariations ) {\n\t\treturn (\n\t\t\t<SidebarNavigationItem\n\t\t\t\t{ ...props }\n\t\t\t\tparams={ { path: '/wp_global_styles' } }\n\t\t\t\tuid=\"global-styles-navigation-item\"\n\t\t\t/>\n\t\t);\n\t}\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\t{ ...props }\n\t\t\tonClick={ () => {\n\t\t\t\t// Switch to edit mode.\n\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t// Open global styles sidebar.\n\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nexport default function SidebarNavigationScreenGlobalStyles( { backPath } ) {\n\tconst { revisions, isLoading: isLoadingRevisions } =\n\t\tuseGlobalStylesRevisions();\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { setCanvasMode, setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { isViewMode, isStyleBookOpened, revisionsCount } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCanvasMode, getEditorCanvasContainerView } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\n\t\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\t\tconst globalStyles = globalStylesId\n\t\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t\t: undefined;\n\t\t\treturn {\n\t\t\t\tisViewMode: 'view' === getCanvasMode(),\n\t\t\t\tisStyleBookOpened:\n\t\t\t\t\t'style-book' === getEditorCanvasContainerView(),\n\t\t\t\trevisionsCount:\n\t\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ??\n\t\t\t\t\t0,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\n\tconst openGlobalStyles = useCallback( async () => {\n\t\treturn Promise.all( [\n\t\t\tsetPreference( 'core', 'distractionFree', false ),\n\t\t\tsetCanvasMode( 'edit' ),\n\t\t\topenGeneralSidebar( 'edit-site/global-styles' ),\n\t\t] );\n\t}, [ setCanvasMode, openGeneralSidebar, setPreference ] );\n\n\tconst openStyleBook = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the Style Book once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. This ensures that\n\t\t// the Style Book is not prematurely closed.\n\t\tsetEditorCanvasContainerView( 'style-book' );\n\t\tsetIsListViewOpened( false );\n\t}, [\n\t\topenGlobalStyles,\n\t\tsetEditorCanvasContainerView,\n\t\tsetIsListViewOpened,\n\t] );\n\n\tconst openRevisions = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the global styles revisions once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. The global styles UI is responsible\n\t\t// for redirecting to the revisions screen once the editor canvas container\n\t\t// has been set to 'global-styles-revisions'.\n\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t}, [ openGlobalStyles, setEditorCanvasContainerView ] );\n\n\t// If there are no revisions, do not render a footer.\n\tconst hasRevisions = revisionsCount > 0;\n\tconst modifiedDateTime = revisions?.[ 0 ]?.modified;\n\tconst shouldShowGlobalStylesFooter =\n\t\thasRevisions && ! isLoadingRevisions && modifiedDateTime;\n\n\treturn (\n\t\t<>\n\t\t\t<SidebarNavigationScreen\n\t\t\t\ttitle={ __( 'Styles' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Choose a different style combination for the theme styles.'\n\t\t\t\t) }\n\t\t\t\tbackPath={ backPath }\n\t\t\t\tcontent={ <SidebarNavigationScreenGlobalStylesContent /> }\n\t\t\t\tfooter={\n\t\t\t\t\tshouldShowGlobalStylesFooter && (\n\t\t\t\t\t\t<SidebarNavigationScreenDetailsFooter\n\t\t\t\t\t\t\trecord={ revisions?.[ 0 ] }\n\t\t\t\t\t\t\tonClick={ openRevisions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isMobileViewport && (\n\t\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\t\ticon={ seen }\n\t\t\t\t\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t\t\t\t\t\t\t! isStyleBookOpened\n\t\t\t\t\t\t\t\t\t\t\t? 'style-book'\n\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tisPressed={ isStyleBookOpened }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ edit }\n\t\t\t\t\t\t\tlabel={ __( 'Edit styles' ) }\n\t\t\t\t\t\t\tonClick={ async () => await openGlobalStyles() }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ isStyleBookOpened && ! isMobileViewport && isViewMode && (\n\t\t\t\t<StyleBook\n\t\t\t\t\tenableResizing={ false }\n\t\t\t\t\tisSelected={ () => false }\n\t\t\t\t\tonClick={ openStyleBook }\n\t\t\t\t\tonSelect={ openStyleBook }\n\t\t\t\t\tshowCloseButton={ false }\n\t\t\t\t\tshowTabs={ false }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AAKA,IAAAQ,wBAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AACA,IAAAW,MAAA,GAAAX,OAAA;AACA,IAAAY,cAAA,GAAAH,sBAAA,CAAAT,OAAA;AACA,IAAAa,sBAAA,GAAAJ,sBAAA,CAAAT,OAAA;AACA,IAAAc,UAAA,GAAAL,sBAAA,CAAAT,OAAA;AACA,IAAAe,yBAAA,GAAAN,sBAAA,CAAAT,OAAA;AACA,IAAAgB,qCAAA,GAAAP,sBAAA,CAAAT,OAAA;AACA,IAAAiB,QAAA,GAAAR,sBAAA,CAAAT,OAAA;AAAmE,IAAAkB,WAAA,GAAAlB,OAAA;AAvBnE;AACA;AACA;;AAUA;AACA;AACA;;AAWO,SAASmB,iCAAiCA,CAAEC,KAAK,EAAG;EAC1D,MAAM;IAAEC;EAAmB,CAAC,GAAG,IAAAC,iBAAW,EAAEC,YAAc,CAAC;EAC3D,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAC,kBAAM,EAAE,IAAAH,iBAAW,EAAEC,YAAc,CAAE,CAAC;EAEhE,MAAMG,wBAAwB,GAAG,IAAAC,eAAS,EACvCC,MAAM,IACP,CAAC,CAAEA,MAAM,CACR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CACA;UACD6B,SAAS,EAAGtC;QAAmB,CAC/B,CACD,eACD,IAAAhC,WAAA,CAAAc,GAAA,EAACpB,cAAA,CAAAqB,OAAa;UACboD,IAAI,EAAGI,WAAM;UACbF,KAAK,EAAG,IAAAR,QAAE,EAAE,aAAc,CAAG;UAC7B1C,OAAO,EAAG,MAAAA,CAAA,KAAY,MAAM4B,gBAAgB,CAAC;QAAG,CAChD,CAAC;MAAA,CACD;IACF,CACD,CAAC,EACAf,iBAAiB,IAAI,CAAEJ,gBAAgB,IAAIG,UAAU,iBACtD,IAAA/B,WAAA,CAAAc,GAAA,EAAClB,UAAA,CAAAmB,OAAS;MACTyD,cAAc,EAAG,KAAO;MACxBC,UAAU,EAAGA,CAAA,KAAM,KAAO;MAC1BtD,OAAO,EAAGgC,aAAe;MACzBuB,QAAQ,EAAGvB,aAAe;MAC1BwB,eAAe,EAAG,KAAO;MACzBC,QAAQ,EAAG;IAAO,CAClB,CACD;EAAA,CACA,CAAC;AAEL","ignoreList":[]}
@@ -87,12 +87,15 @@ const SiteHub = (0, _element.memo)((0, _element.forwardRef)(({
87
87
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalHStack, {
88
88
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
89
89
  className: "edit-site-site-hub__title",
90
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
90
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Button, {
91
91
  variant: "link",
92
92
  href: homeUrl,
93
93
  target: "_blank",
94
- label: (0, _i18n.__)('View site (opens in a new tab)'),
95
- children: (0, _htmlEntities.decodeEntities)(siteTitle)
94
+ children: [(0, _htmlEntities.decodeEntities)(siteTitle), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.VisuallyHidden, {
95
+ as: "span",
96
+ children: /* translators: accessibility text */
97
+ (0, _i18n.__)('(opens in a new tab)')
98
+ })]
96
99
  })
97
100
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalHStack, {
98
101
  spacing: 0,