@wordpress/edit-site 6.31.1-next.f56bd8138.0 → 6.32.1-next.47f435fc9.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 (994) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/add-new-pattern/index.js +153 -141
  3. package/build/components/add-new-pattern/index.js.map +7 -1
  4. package/build/components/add-new-post/index.js +114 -89
  5. package/build/components/add-new-post/index.js.map +7 -1
  6. package/build/components/add-new-template/add-custom-generic-template-modal-content.js +80 -60
  7. package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +7 -1
  8. package/build/components/add-new-template/add-custom-template-modal-content.js +284 -207
  9. package/build/components/add-new-template/add-custom-template-modal-content.js.map +7 -1
  10. package/build/components/add-new-template/index.js +309 -248
  11. package/build/components/add-new-template/index.js.map +7 -1
  12. package/build/components/add-new-template/utils.js +459 -446
  13. package/build/components/add-new-template/utils.js.map +7 -1
  14. package/build/components/app/index.js +72 -63
  15. package/build/components/app/index.js.map +7 -1
  16. package/build/components/block-editor/use-editor-iframe-props.js +63 -66
  17. package/build/components/block-editor/use-editor-iframe-props.js.map +7 -1
  18. package/build/components/block-editor/use-navigate-to-entity-record.js +34 -22
  19. package/build/components/block-editor/use-navigate-to-entity-record.js.map +7 -1
  20. package/build/components/block-editor/use-site-editor-settings.js +64 -51
  21. package/build/components/block-editor/use-site-editor-settings.js.map +7 -1
  22. package/build/components/canvas-loader/index.js +41 -56
  23. package/build/components/canvas-loader/index.js.map +7 -1
  24. package/build/components/dataviews-actions/index.js +96 -83
  25. package/build/components/dataviews-actions/index.js.map +7 -1
  26. package/build/components/editor/index.js +288 -235
  27. package/build/components/editor/index.js.map +7 -1
  28. package/build/components/editor/site-preview.js +55 -42
  29. package/build/components/editor/site-preview.js.map +7 -1
  30. package/build/components/editor/use-adapt-editor-to-canvas.js +49 -31
  31. package/build/components/editor/use-adapt-editor-to-canvas.js.map +7 -1
  32. package/build/components/editor/use-editor-title.js +79 -61
  33. package/build/components/editor/use-editor-title.js.map +7 -1
  34. package/build/components/editor/use-resolve-edited-entity.js +112 -140
  35. package/build/components/editor/use-resolve-edited-entity.js.map +7 -1
  36. package/build/components/editor-canvas-container/index.js +101 -91
  37. package/build/components/editor-canvas-container/index.js.map +7 -1
  38. package/build/components/global-styles/background-panel.js +46 -39
  39. package/build/components/global-styles/background-panel.js.map +7 -1
  40. package/build/components/global-styles/block-preview-panel.js +58 -52
  41. package/build/components/global-styles/block-preview-panel.js.map +7 -1
  42. package/build/components/global-styles/color-indicator-wrapper.js +47 -26
  43. package/build/components/global-styles/color-indicator-wrapper.js.map +7 -1
  44. package/build/components/global-styles/color-palette-panel.js +130 -81
  45. package/build/components/global-styles/color-palette-panel.js.map +7 -1
  46. package/build/components/global-styles/confirm-reset-shadow-dialog.js +38 -22
  47. package/build/components/global-styles/confirm-reset-shadow-dialog.js.map +7 -1
  48. package/build/components/global-styles/dimensions-panel.js +46 -41
  49. package/build/components/global-styles/dimensions-panel.js.map +7 -1
  50. package/build/components/global-styles/font-families.js +106 -102
  51. package/build/components/global-styles/font-families.js.map +7 -1
  52. package/build/components/global-styles/font-family-item.js +41 -43
  53. package/build/components/global-styles/font-family-item.js.map +7 -1
  54. package/build/components/global-styles/font-library-modal/collection-font-variant.js +55 -39
  55. package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +7 -1
  56. package/build/components/global-styles/font-library-modal/context.js +228 -243
  57. package/build/components/global-styles/font-library-modal/context.js.map +7 -1
  58. package/build/components/global-styles/font-library-modal/font-card.js +70 -59
  59. package/build/components/global-styles/font-library-modal/font-card.js.map +7 -1
  60. package/build/components/global-styles/font-library-modal/font-collection.js +407 -321
  61. package/build/components/global-styles/font-library-modal/font-collection.js.map +7 -1
  62. package/build/components/global-styles/font-library-modal/font-demo.js +54 -50
  63. package/build/components/global-styles/font-library-modal/font-demo.js.map +7 -1
  64. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +52 -44
  65. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +7 -1
  66. package/build/components/global-styles/font-library-modal/index.js +90 -87
  67. package/build/components/global-styles/font-library-modal/index.js.map +7 -1
  68. package/build/components/global-styles/font-library-modal/installed-fonts.js +369 -255
  69. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +7 -1
  70. package/build/components/global-styles/font-library-modal/library-font-details.js +60 -42
  71. package/build/components/global-styles/font-library-modal/library-font-details.js.map +7 -1
  72. package/build/components/global-styles/font-library-modal/library-font-variant.js +64 -49
  73. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +7 -1
  74. package/build/components/global-styles/font-library-modal/resolvers.js +64 -31
  75. package/build/components/global-styles/font-library-modal/resolvers.js.map +7 -1
  76. package/build/components/global-styles/font-library-modal/upload-fonts.js +133 -145
  77. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +7 -1
  78. package/build/components/global-styles/font-library-modal/utils/constants.js +45 -24
  79. package/build/components/global-styles/font-library-modal/utils/constants.js.map +7 -1
  80. package/build/components/global-styles/font-library-modal/utils/filter-fonts.js +30 -27
  81. package/build/components/global-styles/font-library-modal/utils/filter-fonts.js.map +7 -1
  82. package/build/components/global-styles/font-library-modal/utils/fonts-outline.js +41 -13
  83. package/build/components/global-styles/font-library-modal/utils/fonts-outline.js.map +7 -1
  84. package/build/components/global-styles/font-library-modal/utils/index.js +127 -161
  85. package/build/components/global-styles/font-library-modal/utils/index.js.map +7 -1
  86. package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js +25 -18
  87. package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +7 -1
  88. package/build/components/global-styles/font-library-modal/utils/preview-styles.js +55 -74
  89. package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +7 -1
  90. package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js +32 -16
  91. package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +7 -1
  92. package/build/components/global-styles/font-library-modal/utils/toggleFont.js +43 -72
  93. package/build/components/global-styles/font-library-modal/utils/toggleFont.js.map +7 -1
  94. package/build/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +44 -23
  95. package/build/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js.map +7 -1
  96. package/build/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +38 -22
  97. package/build/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js.map +7 -1
  98. package/build/components/global-styles/font-sizes/font-size-preview.js +42 -35
  99. package/build/components/global-styles/font-sizes/font-size-preview.js.map +7 -1
  100. package/build/components/global-styles/font-sizes/font-size.js +207 -170
  101. package/build/components/global-styles/font-sizes/font-size.js.map +7 -1
  102. package/build/components/global-styles/font-sizes/font-sizes-count.js +46 -45
  103. package/build/components/global-styles/font-sizes/font-sizes-count.js.map +7 -1
  104. package/build/components/global-styles/font-sizes/font-sizes.js +199 -136
  105. package/build/components/global-styles/font-sizes/font-sizes.js.map +7 -1
  106. package/build/components/global-styles/font-sizes/rename-font-size-dialog.js +81 -58
  107. package/build/components/global-styles/font-sizes/rename-font-size-dialog.js.map +7 -1
  108. package/build/components/global-styles/gradients-palette-panel.js +140 -85
  109. package/build/components/global-styles/gradients-palette-panel.js.map +7 -1
  110. package/build/components/global-styles/header.js +51 -48
  111. package/build/components/global-styles/header.js.map +7 -1
  112. package/build/components/global-styles/highlighted-colors.js +48 -40
  113. package/build/components/global-styles/highlighted-colors.js.map +7 -1
  114. package/build/components/global-styles/hooks.js +89 -68
  115. package/build/components/global-styles/hooks.js.map +7 -1
  116. package/build/components/global-styles/icon-with-current-color.js +50 -25
  117. package/build/components/global-styles/icon-with-current-color.js.map +7 -1
  118. package/build/components/global-styles/index.js +36 -11
  119. package/build/components/global-styles/index.js.map +7 -1
  120. package/build/components/global-styles/navigation-button.js +41 -42
  121. package/build/components/global-styles/navigation-button.js.map +7 -1
  122. package/build/components/global-styles/palette.js +82 -73
  123. package/build/components/global-styles/palette.js.map +7 -1
  124. package/build/components/global-styles/preset-colors.js +36 -24
  125. package/build/components/global-styles/preset-colors.js.map +7 -1
  126. package/build/components/global-styles/preview-colors.js +68 -46
  127. package/build/components/global-styles/preview-colors.js.map +7 -1
  128. package/build/components/global-styles/preview-styles.js +182 -136
  129. package/build/components/global-styles/preview-styles.js.map +7 -1
  130. package/build/components/global-styles/preview-typography.js +65 -44
  131. package/build/components/global-styles/preview-typography.js.map +7 -1
  132. package/build/components/global-styles/preview-wrapper.js +70 -85
  133. package/build/components/global-styles/preview-wrapper.js.map +7 -1
  134. package/build/components/global-styles/root-menu.js +53 -52
  135. package/build/components/global-styles/root-menu.js.map +7 -1
  136. package/build/components/global-styles/screen-background.js +54 -35
  137. package/build/components/global-styles/screen-background.js.map +7 -1
  138. package/build/components/global-styles/screen-block-list.js +129 -118
  139. package/build/components/global-styles/screen-block-list.js.map +7 -1
  140. package/build/components/global-styles/screen-block.js +185 -182
  141. package/build/components/global-styles/screen-block.js.map +7 -1
  142. package/build/components/global-styles/screen-color-palette.js +61 -56
  143. package/build/components/global-styles/screen-color-palette.js.map +7 -1
  144. package/build/components/global-styles/screen-colors.js +64 -40
  145. package/build/components/global-styles/screen-colors.js.map +7 -1
  146. package/build/components/global-styles/screen-css.js +80 -50
  147. package/build/components/global-styles/screen-css.js.map +7 -1
  148. package/build/components/global-styles/screen-layout.js +45 -32
  149. package/build/components/global-styles/screen-layout.js.map +7 -1
  150. package/build/components/global-styles/screen-revisions/index.js +144 -116
  151. package/build/components/global-styles/screen-revisions/index.js.map +7 -1
  152. package/build/components/global-styles/screen-revisions/revisions-buttons.js +165 -166
  153. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +7 -1
  154. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +93 -81
  155. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +7 -1
  156. package/build/components/global-styles/screen-root.js +93 -84
  157. package/build/components/global-styles/screen-root.js.map +7 -1
  158. package/build/components/global-styles/screen-shadows.js +43 -16
  159. package/build/components/global-styles/screen-shadows.js.map +7 -1
  160. package/build/components/global-styles/screen-style-variations.js +64 -44
  161. package/build/components/global-styles/screen-style-variations.js.map +7 -1
  162. package/build/components/global-styles/screen-typography-element.js +146 -93
  163. package/build/components/global-styles/screen-typography-element.js.map +7 -1
  164. package/build/components/global-styles/screen-typography.js +64 -40
  165. package/build/components/global-styles/screen-typography.js.map +7 -1
  166. package/build/components/global-styles/shadow-utils.js +75 -180
  167. package/build/components/global-styles/shadow-utils.js.map +7 -1
  168. package/build/components/global-styles/shadows-edit-panel.js +433 -358
  169. package/build/components/global-styles/shadows-edit-panel.js.map +7 -1
  170. package/build/components/global-styles/shadows-panel.js +178 -131
  171. package/build/components/global-styles/shadows-panel.js.map +7 -1
  172. package/build/components/global-styles/size-control/index.js +66 -76
  173. package/build/components/global-styles/size-control/index.js.map +7 -1
  174. package/build/components/global-styles/style-variations-container.js +114 -102
  175. package/build/components/global-styles/style-variations-container.js.map +7 -1
  176. package/build/components/global-styles/subtitle.js +34 -21
  177. package/build/components/global-styles/subtitle.js.map +7 -1
  178. package/build/components/global-styles/typeset.js +73 -75
  179. package/build/components/global-styles/typeset.js.map +7 -1
  180. package/build/components/global-styles/typography-elements.js +109 -86
  181. package/build/components/global-styles/typography-elements.js.map +7 -1
  182. package/build/components/global-styles/typography-example.js +66 -65
  183. package/build/components/global-styles/typography-example.js.map +7 -1
  184. package/build/components/global-styles/typography-panel.js +57 -39
  185. package/build/components/global-styles/typography-panel.js.map +7 -1
  186. package/build/components/global-styles/typography-preview.js +73 -53
  187. package/build/components/global-styles/typography-preview.js.map +7 -1
  188. package/build/components/global-styles/ui.js +282 -314
  189. package/build/components/global-styles/ui.js.map +7 -1
  190. package/build/components/global-styles/utils.js +45 -31
  191. package/build/components/global-styles/utils.js.map +7 -1
  192. package/build/components/global-styles/variations/variation.js +90 -74
  193. package/build/components/global-styles/variations/variation.js.map +7 -1
  194. package/build/components/global-styles/variations/variations-color.js +52 -41
  195. package/build/components/global-styles/variations/variations-color.js.map +7 -1
  196. package/build/components/global-styles/variations/variations-panel.js +61 -51
  197. package/build/components/global-styles/variations/variations-panel.js.map +7 -1
  198. package/build/components/global-styles/variations/variations-typography.js +69 -49
  199. package/build/components/global-styles/variations/variations-typography.js.map +7 -1
  200. package/build/components/global-styles-renderer/index.js +39 -33
  201. package/build/components/global-styles-renderer/index.js.map +7 -1
  202. package/build/components/global-styles-sidebar/default-sidebar.js +53 -40
  203. package/build/components/global-styles-sidebar/default-sidebar.js.map +7 -1
  204. package/build/components/global-styles-sidebar/index.js +164 -141
  205. package/build/components/global-styles-sidebar/index.js.map +7 -1
  206. package/build/components/layout/animation.js +53 -78
  207. package/build/components/layout/animation.js.map +7 -1
  208. package/build/components/layout/hooks.js +40 -35
  209. package/build/components/layout/hooks.js.map +7 -1
  210. package/build/components/layout/index.js +220 -199
  211. package/build/components/layout/index.js.map +7 -1
  212. package/build/components/media/index.js +31 -26
  213. package/build/components/media/index.js.map +7 -1
  214. package/build/components/more-menu/index.js +45 -28
  215. package/build/components/more-menu/index.js.map +7 -1
  216. package/build/components/more-menu/site-export.js +69 -44
  217. package/build/components/more-menu/site-export.js.map +7 -1
  218. package/build/components/more-menu/welcome-guide-menu-item.js +29 -21
  219. package/build/components/more-menu/welcome-guide-menu-item.js.map +7 -1
  220. package/build/components/page-patterns/actions.js +82 -0
  221. package/build/components/page-patterns/actions.js.map +7 -0
  222. package/build/components/page-patterns/delete-category-menu-item.js +94 -82
  223. package/build/components/page-patterns/delete-category-menu-item.js.map +7 -1
  224. package/build/components/page-patterns/fields.js +135 -123
  225. package/build/components/page-patterns/fields.js.map +7 -1
  226. package/build/components/page-patterns/index.js +182 -148
  227. package/build/components/page-patterns/index.js.map +7 -1
  228. package/build/components/page-patterns/rename-category-menu-item.js +67 -62
  229. package/build/components/page-patterns/rename-category-menu-item.js.map +7 -1
  230. package/build/components/page-patterns/search-items.js +65 -89
  231. package/build/components/page-patterns/search-items.js.map +7 -1
  232. package/build/components/page-patterns/use-pattern-settings.js +45 -35
  233. package/build/components/page-patterns/use-pattern-settings.js.map +7 -1
  234. package/build/components/page-patterns/use-patterns.js +266 -200
  235. package/build/components/page-patterns/use-patterns.js.map +7 -1
  236. package/build/components/page-patterns/utils.js +27 -7
  237. package/build/components/page-patterns/utils.js.map +7 -1
  238. package/build/components/page-templates/fields.js +165 -159
  239. package/build/components/page-templates/fields.js.map +7 -1
  240. package/build/components/page-templates/hooks.js +66 -64
  241. package/build/components/page-templates/hooks.js.map +7 -1
  242. package/build/components/page-templates/index.js +211 -207
  243. package/build/components/page-templates/index.js.map +7 -1
  244. package/build/components/page-templates/view-utils.js +67 -0
  245. package/build/components/page-templates/view-utils.js.map +7 -0
  246. package/build/components/pagination/index.js +119 -82
  247. package/build/components/pagination/index.js.map +7 -1
  248. package/build/components/plugin-template-setting-panel/index.js +49 -56
  249. package/build/components/plugin-template-setting-panel/index.js.map +7 -1
  250. package/build/components/post-edit/index.js +171 -144
  251. package/build/components/post-edit/index.js.map +7 -1
  252. package/build/components/post-list/index.js +230 -301
  253. package/build/components/post-list/index.js.map +7 -1
  254. package/build/components/post-list/view-utils.js +167 -0
  255. package/build/components/post-list/view-utils.js.map +7 -0
  256. package/build/components/posts-app/index.js +44 -32
  257. package/build/components/posts-app/index.js.map +7 -1
  258. package/build/components/posts-app-routes/index.js +36 -25
  259. package/build/components/posts-app-routes/index.js.map +7 -1
  260. package/build/components/posts-app-routes/post-item.js +54 -35
  261. package/build/components/posts-app-routes/post-item.js.map +7 -1
  262. package/build/components/posts-app-routes/posts.js +91 -76
  263. package/build/components/posts-app-routes/posts.js.map +7 -1
  264. package/build/components/resizable-frame/index.js +200 -224
  265. package/build/components/resizable-frame/index.js.map +7 -1
  266. package/build/components/revisions/index.js +102 -71
  267. package/build/components/revisions/index.js.map +7 -1
  268. package/build/components/routes/use-title.js +45 -35
  269. package/build/components/routes/use-title.js.map +7 -1
  270. package/build/components/save-button/index.js +113 -111
  271. package/build/components/save-button/index.js.map +7 -1
  272. package/build/components/save-hub/index.js +52 -40
  273. package/build/components/save-hub/index.js.map +7 -1
  274. package/build/components/save-keyboard-shortcut/index.js +46 -52
  275. package/build/components/save-keyboard-shortcut/index.js.map +7 -1
  276. package/build/components/save-panel/index.js +155 -136
  277. package/build/components/save-panel/index.js.map +7 -1
  278. package/build/components/sidebar/index.js +81 -79
  279. package/build/components/sidebar/index.js.map +7 -1
  280. package/build/components/sidebar-button/index.js +43 -22
  281. package/build/components/sidebar-button/index.js.map +7 -1
  282. package/build/components/sidebar-dataviews/dataview-item.js +68 -55
  283. package/build/components/sidebar-dataviews/dataview-item.js.map +7 -1
  284. package/build/components/sidebar-dataviews/index.js +68 -54
  285. package/build/components/sidebar-dataviews/index.js.map +7 -1
  286. package/build/components/sidebar-global-styles-wrapper/index.js +125 -111
  287. package/build/components/sidebar-global-styles-wrapper/index.js.map +7 -1
  288. package/build/components/sidebar-navigation-item/index.js +79 -62
  289. package/build/components/sidebar-navigation-item/index.js.map +7 -1
  290. package/build/components/sidebar-navigation-screen/index.js +129 -104
  291. package/build/components/sidebar-navigation-screen/index.js.map +7 -1
  292. package/build/components/sidebar-navigation-screen-details-footer/index.js +63 -53
  293. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +7 -1
  294. package/build/components/sidebar-navigation-screen-global-styles/content.js +50 -33
  295. package/build/components/sidebar-navigation-screen-global-styles/content.js.map +7 -1
  296. package/build/components/sidebar-navigation-screen-global-styles/index.js +94 -81
  297. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +7 -1
  298. package/build/components/sidebar-navigation-screen-main/index.js +141 -90
  299. package/build/components/sidebar-navigation-screen-main/index.js.map +7 -1
  300. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +40 -29
  301. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +7 -1
  302. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +124 -91
  303. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +7 -1
  304. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +116 -83
  305. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +7 -1
  306. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +57 -48
  307. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +7 -1
  308. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +80 -66
  309. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +7 -1
  310. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +64 -38
  311. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +7 -1
  312. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +125 -96
  313. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +7 -1
  314. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +33 -19
  315. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +7 -1
  316. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js +30 -16
  317. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +7 -1
  318. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +119 -105
  319. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +7 -1
  320. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +130 -121
  321. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +7 -1
  322. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +106 -88
  323. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +7 -1
  324. package/build/components/sidebar-navigation-screen-patterns/category-item.js +44 -21
  325. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +7 -1
  326. package/build/components/sidebar-navigation-screen-patterns/index.js +129 -106
  327. package/build/components/sidebar-navigation-screen-patterns/index.js.map +7 -1
  328. package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +36 -25
  329. package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +7 -1
  330. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +81 -70
  331. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +7 -1
  332. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +42 -32
  333. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +7 -1
  334. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +41 -28
  335. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +7 -1
  336. package/build/components/sidebar-navigation-screen-templates-browse/content.js +95 -76
  337. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +7 -1
  338. package/build/components/sidebar-navigation-screen-templates-browse/index.js +48 -27
  339. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +7 -1
  340. package/build/components/sidebar-navigation-screen-unsupported/index.js +28 -20
  341. package/build/components/sidebar-navigation-screen-unsupported/index.js.map +7 -1
  342. package/build/components/site-editor-routes/home.js +50 -32
  343. package/build/components/site-editor-routes/home.js.map +7 -1
  344. package/build/components/site-editor-routes/index.js +62 -36
  345. package/build/components/site-editor-routes/index.js.map +7 -1
  346. package/build/components/site-editor-routes/navigation-item.js +55 -49
  347. package/build/components/site-editor-routes/navigation-item.js.map +7 -1
  348. package/build/components/site-editor-routes/navigation.js +55 -49
  349. package/build/components/site-editor-routes/navigation.js.map +7 -1
  350. package/build/components/site-editor-routes/notfound.js +54 -34
  351. package/build/components/site-editor-routes/notfound.js.map +7 -1
  352. package/build/components/site-editor-routes/page-item.js +58 -41
  353. package/build/components/site-editor-routes/page-item.js.map +7 -1
  354. package/build/components/site-editor-routes/pages.js +96 -86
  355. package/build/components/site-editor-routes/pages.js.map +7 -1
  356. package/build/components/site-editor-routes/pattern-item.js +48 -26
  357. package/build/components/site-editor-routes/pattern-item.js.map +7 -1
  358. package/build/components/site-editor-routes/patterns.js +51 -36
  359. package/build/components/site-editor-routes/patterns.js.map +7 -1
  360. package/build/components/site-editor-routes/stylebook.js +60 -43
  361. package/build/components/site-editor-routes/stylebook.js.map +7 -1
  362. package/build/components/site-editor-routes/styles.js +58 -46
  363. package/build/components/site-editor-routes/styles.js.map +7 -1
  364. package/build/components/site-editor-routes/template-item.js +54 -34
  365. package/build/components/site-editor-routes/template-item.js.map +7 -1
  366. package/build/components/site-editor-routes/template-part-item.js +45 -21
  367. package/build/components/site-editor-routes/template-part-item.js.map +7 -1
  368. package/build/components/site-editor-routes/templates.js +69 -44
  369. package/build/components/site-editor-routes/templates.js.map +7 -1
  370. package/build/components/site-editor-routes/utils.js +27 -13
  371. package/build/components/site-editor-routes/utils.js.map +7 -1
  372. package/build/components/site-hub/index.js +233 -222
  373. package/build/components/site-hub/index.js.map +7 -1
  374. package/build/components/site-icon/index.js +61 -49
  375. package/build/components/site-icon/index.js.map +7 -1
  376. package/build/components/style-book/categories.js +61 -52
  377. package/build/components/style-book/categories.js.map +7 -1
  378. package/build/components/style-book/color-examples.js +54 -40
  379. package/build/components/style-book/color-examples.js.map +7 -1
  380. package/build/components/style-book/constants.js +218 -144
  381. package/build/components/style-book/constants.js.map +7 -1
  382. package/build/components/style-book/duotone-examples.js +54 -40
  383. package/build/components/style-book/duotone-examples.js.map +7 -1
  384. package/build/components/style-book/examples.js +145 -120
  385. package/build/components/style-book/examples.js.map +7 -1
  386. package/build/components/style-book/index.js +454 -409
  387. package/build/components/style-book/index.js.map +7 -1
  388. package/build/components/style-book/types.js +16 -5
  389. package/build/components/style-book/types.js.map +7 -1
  390. package/build/components/welcome-guide/editor.js +87 -60
  391. package/build/components/welcome-guide/editor.js.map +7 -1
  392. package/build/components/welcome-guide/image.js +34 -22
  393. package/build/components/welcome-guide/image.js.map +7 -1
  394. package/build/components/welcome-guide/index.js +44 -21
  395. package/build/components/welcome-guide/index.js.map +7 -1
  396. package/build/components/welcome-guide/page.js +76 -52
  397. package/build/components/welcome-guide/page.js.map +7 -1
  398. package/build/components/welcome-guide/styles.js +135 -102
  399. package/build/components/welcome-guide/styles.js.map +7 -1
  400. package/build/components/welcome-guide/template.js +71 -59
  401. package/build/components/welcome-guide/template.js.map +7 -1
  402. package/build/deprecated.js +56 -46
  403. package/build/deprecated.js.map +7 -1
  404. package/build/hooks/commands/use-common-commands.js +117 -119
  405. package/build/hooks/commands/use-common-commands.js.map +7 -1
  406. package/build/hooks/commands/use-set-command-context.js +40 -50
  407. package/build/hooks/commands/use-set-command-context.js.map +7 -1
  408. package/build/hooks/index.js +2 -3
  409. package/build/hooks/index.js.map +7 -1
  410. package/build/hooks/push-changes-to-global-styles/index.js +236 -251
  411. package/build/hooks/push-changes-to-global-styles/index.js.map +7 -1
  412. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +78 -111
  413. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +7 -1
  414. package/build/index.js +87 -112
  415. package/build/index.js.map +7 -1
  416. package/build/lock-unlock.js +31 -14
  417. package/build/lock-unlock.js.map +7 -1
  418. package/build/posts.js +67 -63
  419. package/build/posts.js.map +7 -1
  420. package/build/store/actions.js +199 -365
  421. package/build/store/actions.js.map +7 -1
  422. package/build/store/constants.js +27 -11
  423. package/build/store/constants.js.map +7 -1
  424. package/build/store/index.js +52 -30
  425. package/build/store/index.js.map +7 -1
  426. package/build/store/private-actions.js +34 -19
  427. package/build/store/private-actions.js.map +7 -1
  428. package/build/store/private-selectors.js +28 -13
  429. package/build/store/private-selectors.js.map +7 -1
  430. package/build/store/reducer.js +42 -57
  431. package/build/store/reducer.js.map +7 -1
  432. package/build/store/selectors.js +205 -301
  433. package/build/store/selectors.js.map +7 -1
  434. package/build/utils/constants.js +94 -53
  435. package/build/utils/constants.js.map +7 -1
  436. package/build/utils/get-filtered-template-parts.js +36 -42
  437. package/build/utils/get-filtered-template-parts.js.map +7 -1
  438. package/build/utils/is-previewing-theme.js +31 -13
  439. package/build/utils/is-previewing-theme.js.map +7 -1
  440. package/build/utils/is-template-removable.js +24 -17
  441. package/build/utils/is-template-removable.js.map +7 -1
  442. package/build/utils/is-template-revertable.js +24 -19
  443. package/build/utils/is-template-revertable.js.map +7 -1
  444. package/build/utils/set-nested-value.js +24 -25
  445. package/build/utils/set-nested-value.js.map +7 -1
  446. package/build/utils/template-part-create.js +1 -1
  447. package/build/utils/template-part-create.js.map +7 -1
  448. package/build/utils/use-activate-theme.js +40 -45
  449. package/build/utils/use-activate-theme.js.map +7 -1
  450. package/build/utils/use-actual-current-theme.js +47 -25
  451. package/build/utils/use-actual-current-theme.js.map +7 -1
  452. package/build-module/components/add-new-pattern/index.js +133 -127
  453. package/build-module/components/add-new-pattern/index.js.map +7 -1
  454. package/build-module/components/add-new-post/index.js +100 -82
  455. package/build-module/components/add-new-post/index.js.map +7 -1
  456. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +63 -51
  457. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +7 -1
  458. package/build-module/components/add-new-template/add-custom-template-modal-content.js +269 -196
  459. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +7 -1
  460. package/build-module/components/add-new-template/index.js +289 -219
  461. package/build-module/components/add-new-template/index.js.map +7 -1
  462. package/build-module/components/add-new-template/utils.js +430 -432
  463. package/build-module/components/add-new-template/utils.js.map +7 -1
  464. package/build-module/components/app/index.js +41 -51
  465. package/build-module/components/app/index.js.map +7 -1
  466. package/build-module/components/block-editor/use-editor-iframe-props.js +33 -58
  467. package/build-module/components/block-editor/use-editor-iframe-props.js.map +7 -1
  468. package/build-module/components/block-editor/use-navigate-to-entity-record.js +17 -18
  469. package/build-module/components/block-editor/use-navigate-to-entity-record.js.map +7 -1
  470. package/build-module/components/block-editor/use-site-editor-settings.js +28 -41
  471. package/build-module/components/block-editor/use-site-editor-settings.js.map +7 -1
  472. package/build-module/components/canvas-loader/index.js +25 -50
  473. package/build-module/components/canvas-loader/index.js.map +7 -1
  474. package/build-module/components/dataviews-actions/index.js +75 -78
  475. package/build-module/components/dataviews-actions/index.js.map +7 -1
  476. package/build-module/components/editor/index.js +261 -220
  477. package/build-module/components/editor/index.js.map +7 -1
  478. package/build-module/components/editor/site-preview.js +38 -38
  479. package/build-module/components/editor/site-preview.js.map +7 -1
  480. package/build-module/components/editor/use-adapt-editor-to-canvas.js +25 -24
  481. package/build-module/components/editor/use-adapt-editor-to-canvas.js.map +7 -1
  482. package/build-module/components/editor/use-editor-title.js +49 -53
  483. package/build-module/components/editor/use-editor-title.js.map +7 -1
  484. package/build-module/components/editor/use-resolve-edited-entity.js +89 -129
  485. package/build-module/components/editor/use-resolve-edited-entity.js.map +7 -1
  486. package/build-module/components/editor-canvas-container/index.js +79 -80
  487. package/build-module/components/editor-canvas-container/index.js.map +7 -1
  488. package/build-module/components/global-styles/background-panel.js +25 -35
  489. package/build-module/components/global-styles/background-panel.js.map +7 -1
  490. package/build-module/components/global-styles/block-preview-panel.js +36 -43
  491. package/build-module/components/global-styles/block-preview-panel.js.map +7 -1
  492. package/build-module/components/global-styles/color-indicator-wrapper.js +19 -20
  493. package/build-module/components/global-styles/color-indicator-wrapper.js.map +7 -1
  494. package/build-module/components/global-styles/color-palette-panel.js +105 -74
  495. package/build-module/components/global-styles/color-palette-panel.js.map +7 -1
  496. package/build-module/components/global-styles/confirm-reset-shadow-dialog.js +20 -17
  497. package/build-module/components/global-styles/confirm-reset-shadow-dialog.js.map +7 -1
  498. package/build-module/components/global-styles/dimensions-panel.js +26 -34
  499. package/build-module/components/global-styles/dimensions-panel.js.map +7 -1
  500. package/build-module/components/global-styles/font-families.js +86 -93
  501. package/build-module/components/global-styles/font-families.js.map +7 -1
  502. package/build-module/components/global-styles/font-family-item.js +26 -37
  503. package/build-module/components/global-styles/font-family-item.js.map +7 -1
  504. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js +26 -32
  505. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +7 -1
  506. package/build-module/components/global-styles/font-library-modal/context.js +203 -224
  507. package/build-module/components/global-styles/font-library-modal/context.js.map +7 -1
  508. package/build-module/components/global-styles/font-library-modal/font-card.js +48 -52
  509. package/build-module/components/global-styles/font-library-modal/font-card.js.map +7 -1
  510. package/build-module/components/global-styles/font-library-modal/font-collection.js +397 -302
  511. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +7 -1
  512. package/build-module/components/global-styles/font-library-modal/font-demo.js +32 -38
  513. package/build-module/components/global-styles/font-library-modal/font-demo.js.map +7 -1
  514. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +41 -39
  515. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +7 -1
  516. package/build-module/components/global-styles/font-library-modal/index.js +65 -81
  517. package/build-module/components/global-styles/font-library-modal/index.js.map +7 -1
  518. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +354 -243
  519. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +7 -1
  520. package/build-module/components/global-styles/font-library-modal/library-font-details.js +35 -36
  521. package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +7 -1
  522. package/build-module/components/global-styles/font-library-modal/library-font-variant.js +35 -42
  523. package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +7 -1
  524. package/build-module/components/global-styles/font-library-modal/resolvers.js +27 -20
  525. package/build-module/components/global-styles/font-library-modal/resolvers.js.map +7 -1
  526. package/build-module/components/global-styles/font-library-modal/upload-fonts.js +111 -135
  527. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +7 -1
  528. package/build-module/components/global-styles/font-library-modal/utils/constants.js +21 -19
  529. package/build-module/components/global-styles/font-library-modal/utils/constants.js.map +7 -1
  530. package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js +13 -24
  531. package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js.map +7 -1
  532. package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js +20 -10
  533. package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js.map +7 -1
  534. package/build-module/components/global-styles/font-library-modal/utils/index.js +102 -154
  535. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +7 -1
  536. package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js +8 -14
  537. package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +7 -1
  538. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js +34 -71
  539. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +7 -1
  540. package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js +11 -13
  541. package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +7 -1
  542. package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js +22 -69
  543. package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js.map +7 -1
  544. package/build-module/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +26 -18
  545. package/build-module/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js.map +7 -1
  546. package/build-module/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +20 -17
  547. package/build-module/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js.map +7 -1
  548. package/build-module/components/global-styles/font-sizes/font-size-preview.js +26 -29
  549. package/build-module/components/global-styles/font-sizes/font-size-preview.js.map +7 -1
  550. package/build-module/components/global-styles/font-sizes/font-size.js +185 -160
  551. package/build-module/components/global-styles/font-sizes/font-size.js.map +7 -1
  552. package/build-module/components/global-styles/font-sizes/font-sizes-count.js +23 -39
  553. package/build-module/components/global-styles/font-sizes/font-sizes-count.js.map +7 -1
  554. package/build-module/components/global-styles/font-sizes/font-sizes.js +184 -128
  555. package/build-module/components/global-styles/font-sizes/font-sizes.js.map +7 -1
  556. package/build-module/components/global-styles/font-sizes/rename-font-size-dialog.js +68 -52
  557. package/build-module/components/global-styles/font-sizes/rename-font-size-dialog.js.map +7 -1
  558. package/build-module/components/global-styles/gradients-palette-panel.js +117 -79
  559. package/build-module/components/global-styles/gradients-palette-panel.js.map +7 -1
  560. package/build-module/components/global-styles/header.js +40 -43
  561. package/build-module/components/global-styles/header.js.map +7 -1
  562. package/build-module/components/global-styles/highlighted-colors.js +31 -36
  563. package/build-module/components/global-styles/highlighted-colors.js.map +7 -1
  564. package/build-module/components/global-styles/hooks.js +56 -61
  565. package/build-module/components/global-styles/hooks.js.map +7 -1
  566. package/build-module/components/global-styles/icon-with-current-color.js +18 -19
  567. package/build-module/components/global-styles/icon-with-current-color.js.map +7 -1
  568. package/build-module/components/global-styles/index.js +5 -2
  569. package/build-module/components/global-styles/index.js.map +7 -1
  570. package/build-module/components/global-styles/navigation-button.js +23 -37
  571. package/build-module/components/global-styles/navigation-button.js.map +7 -1
  572. package/build-module/components/global-styles/palette.js +61 -67
  573. package/build-module/components/global-styles/palette.js.map +7 -1
  574. package/build-module/components/global-styles/preset-colors.js +19 -20
  575. package/build-module/components/global-styles/preset-colors.js.map +7 -1
  576. package/build-module/components/global-styles/preview-colors.js +43 -40
  577. package/build-module/components/global-styles/preview-colors.js.map +7 -1
  578. package/build-module/components/global-styles/preview-styles.js +158 -130
  579. package/build-module/components/global-styles/preview-styles.js.map +7 -1
  580. package/build-module/components/global-styles/preview-typography.js +37 -38
  581. package/build-module/components/global-styles/preview-typography.js.map +7 -1
  582. package/build-module/components/global-styles/preview-wrapper.js +51 -75
  583. package/build-module/components/global-styles/preview-wrapper.js.map +7 -1
  584. package/build-module/components/global-styles/root-menu.js +38 -44
  585. package/build-module/components/global-styles/root-menu.js.map +7 -1
  586. package/build-module/components/global-styles/screen-background.js +26 -29
  587. package/build-module/components/global-styles/screen-background.js.map +7 -1
  588. package/build-module/components/global-styles/screen-block-list.js +105 -105
  589. package/build-module/components/global-styles/screen-block-list.js.map +7 -1
  590. package/build-module/components/global-styles/screen-block.js +156 -169
  591. package/build-module/components/global-styles/screen-block.js.map +7 -1
  592. package/build-module/components/global-styles/screen-color-palette.js +33 -50
  593. package/build-module/components/global-styles/screen-color-palette.js.map +7 -1
  594. package/build-module/components/global-styles/screen-colors.js +35 -33
  595. package/build-module/components/global-styles/screen-colors.js.map +7 -1
  596. package/build-module/components/global-styles/screen-css.js +52 -44
  597. package/build-module/components/global-styles/screen-css.js.map +7 -1
  598. package/build-module/components/global-styles/screen-layout.js +17 -26
  599. package/build-module/components/global-styles/screen-layout.js.map +7 -1
  600. package/build-module/components/global-styles/screen-revisions/index.js +117 -105
  601. package/build-module/components/global-styles/screen-revisions/index.js.map +7 -1
  602. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +145 -158
  603. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +7 -1
  604. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +74 -75
  605. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +7 -1
  606. package/build-module/components/global-styles/screen-root.js +74 -77
  607. package/build-module/components/global-styles/screen-root.js.map +7 -1
  608. package/build-module/components/global-styles/screen-shadows.js +12 -11
  609. package/build-module/components/global-styles/screen-shadows.js.map +7 -1
  610. package/build-module/components/global-styles/screen-style-variations.js +38 -37
  611. package/build-module/components/global-styles/screen-style-variations.js.map +7 -1
  612. package/build-module/components/global-styles/screen-typography-element.js +122 -87
  613. package/build-module/components/global-styles/screen-typography-element.js.map +7 -1
  614. package/build-module/components/global-styles/screen-typography.js +36 -34
  615. package/build-module/components/global-styles/screen-typography.js.map +7 -1
  616. package/build-module/components/global-styles/shadow-utils.js +53 -176
  617. package/build-module/components/global-styles/shadow-utils.js.map +7 -1
  618. package/build-module/components/global-styles/shadows-edit-panel.js +426 -344
  619. package/build-module/components/global-styles/shadows-edit-panel.js.map +7 -1
  620. package/build-module/components/global-styles/shadows-panel.js +159 -124
  621. package/build-module/components/global-styles/shadows-panel.js.map +7 -1
  622. package/build-module/components/global-styles/size-control/index.js +57 -70
  623. package/build-module/components/global-styles/size-control/index.js.map +7 -1
  624. package/build-module/components/global-styles/style-variations-container.js +85 -95
  625. package/build-module/components/global-styles/style-variations-container.js.map +7 -1
  626. package/build-module/components/global-styles/subtitle.js +16 -16
  627. package/build-module/components/global-styles/subtitle.js.map +7 -1
  628. package/build-module/components/global-styles/typeset.js +50 -65
  629. package/build-module/components/global-styles/typeset.js.map +7 -1
  630. package/build-module/components/global-styles/typography-elements.js +86 -80
  631. package/build-module/components/global-styles/typography-elements.js.map +7 -1
  632. package/build-module/components/global-styles/typography-example.js +45 -57
  633. package/build-module/components/global-styles/typography-example.js.map +7 -1
  634. package/build-module/components/global-styles/typography-panel.js +38 -33
  635. package/build-module/components/global-styles/typography-panel.js.map +7 -1
  636. package/build-module/components/global-styles/typography-preview.js +55 -48
  637. package/build-module/components/global-styles/typography-preview.js.map +7 -1
  638. package/build-module/components/global-styles/ui.js +252 -295
  639. package/build-module/components/global-styles/ui.js.map +7 -1
  640. package/build-module/components/global-styles/utils.js +24 -28
  641. package/build-module/components/global-styles/utils.js.map +7 -1
  642. package/build-module/components/global-styles/variations/variation.js +59 -65
  643. package/build-module/components/global-styles/variations/variation.js.map +7 -1
  644. package/build-module/components/global-styles/variations/variations-color.js +26 -34
  645. package/build-module/components/global-styles/variations/variations-color.js.map +7 -1
  646. package/build-module/components/global-styles/variations/variations-panel.js +39 -46
  647. package/build-module/components/global-styles/variations/variations-panel.js.map +7 -1
  648. package/build-module/components/global-styles/variations/variations-typography.js +43 -42
  649. package/build-module/components/global-styles/variations/variations-typography.js.map +7 -1
  650. package/build-module/components/global-styles-renderer/index.js +16 -27
  651. package/build-module/components/global-styles-renderer/index.js.map +7 -1
  652. package/build-module/components/global-styles-sidebar/default-sidebar.js +36 -36
  653. package/build-module/components/global-styles-sidebar/default-sidebar.js.map +7 -1
  654. package/build-module/components/global-styles-sidebar/index.js +137 -133
  655. package/build-module/components/global-styles-sidebar/index.js.map +7 -1
  656. package/build-module/components/layout/animation.js +31 -69
  657. package/build-module/components/layout/animation.js.map +7 -1
  658. package/build-module/components/layout/hooks.js +16 -28
  659. package/build-module/components/layout/hooks.js.map +7 -1
  660. package/build-module/components/layout/index.js +199 -183
  661. package/build-module/components/layout/index.js.map +7 -1
  662. package/build-module/components/media/index.js +13 -21
  663. package/build-module/components/media/index.js.map +7 -1
  664. package/build-module/components/more-menu/index.js +18 -23
  665. package/build-module/components/more-menu/index.js.map +7 -1
  666. package/build-module/components/more-menu/site-export.js +41 -38
  667. package/build-module/components/more-menu/site-export.js.map +7 -1
  668. package/build-module/components/more-menu/welcome-guide-menu-item.js +12 -17
  669. package/build-module/components/more-menu/welcome-guide-menu-item.js.map +7 -1
  670. package/build-module/components/page-patterns/actions.js +52 -0
  671. package/build-module/components/page-patterns/actions.js.map +7 -0
  672. package/build-module/components/page-patterns/delete-category-menu-item.js +78 -76
  673. package/build-module/components/page-patterns/delete-category-menu-item.js.map +7 -1
  674. package/build-module/components/page-patterns/fields.js +103 -112
  675. package/build-module/components/page-patterns/fields.js.map +7 -1
  676. package/build-module/components/page-patterns/index.js +144 -120
  677. package/build-module/components/page-patterns/index.js.map +7 -1
  678. package/build-module/components/page-patterns/rename-category-menu-item.js +37 -53
  679. package/build-module/components/page-patterns/rename-category-menu-item.js.map +7 -1
  680. package/build-module/components/page-patterns/search-items.js +43 -77
  681. package/build-module/components/page-patterns/search-items.js.map +7 -1
  682. package/build-module/components/page-patterns/use-pattern-settings.js +27 -30
  683. package/build-module/components/page-patterns/use-pattern-settings.js.map +7 -1
  684. package/build-module/components/page-patterns/use-patterns.js +249 -192
  685. package/build-module/components/page-patterns/use-patterns.js.map +7 -1
  686. package/build-module/components/page-patterns/utils.js +5 -2
  687. package/build-module/components/page-patterns/utils.js.map +7 -1
  688. package/build-module/components/page-templates/fields.js +132 -147
  689. package/build-module/components/page-templates/fields.js.map +7 -1
  690. package/build-module/components/page-templates/hooks.js +44 -55
  691. package/build-module/components/page-templates/hooks.js.map +7 -1
  692. package/build-module/components/page-templates/index.js +189 -194
  693. package/build-module/components/page-templates/index.js.map +7 -1
  694. package/build-module/components/page-templates/view-utils.js +42 -0
  695. package/build-module/components/page-templates/view-utils.js.map +7 -0
  696. package/build-module/components/pagination/index.js +96 -77
  697. package/build-module/components/pagination/index.js.map +7 -1
  698. package/build-module/components/plugin-template-setting-panel/index.js +21 -50
  699. package/build-module/components/plugin-template-setting-panel/index.js.map +7 -1
  700. package/build-module/components/post-edit/index.js +136 -135
  701. package/build-module/components/post-edit/index.js.map +7 -1
  702. package/build-module/components/post-list/index.js +205 -291
  703. package/build-module/components/post-list/index.js.map +7 -1
  704. package/build-module/components/post-list/view-utils.js +149 -0
  705. package/build-module/components/post-list/view-utils.js.map +7 -0
  706. package/build-module/components/posts-app/index.js +15 -25
  707. package/build-module/components/posts-app/index.js.map +7 -1
  708. package/build-module/components/posts-app-routes/index.js +12 -18
  709. package/build-module/components/posts-app-routes/index.js.map +7 -1
  710. package/build-module/components/posts-app-routes/post-item.js +22 -29
  711. package/build-module/components/posts-app-routes/post-item.js.map +7 -1
  712. package/build-module/components/posts-app-routes/posts.js +59 -70
  713. package/build-module/components/posts-app-routes/posts.js.map +7 -1
  714. package/build-module/components/resizable-frame/index.js +169 -211
  715. package/build-module/components/resizable-frame/index.js.map +7 -1
  716. package/build-module/components/revisions/index.js +78 -64
  717. package/build-module/components/revisions/index.js.map +7 -1
  718. package/build-module/components/routes/use-title.js +25 -28
  719. package/build-module/components/routes/use-title.js.map +7 -1
  720. package/build-module/components/save-button/index.js +99 -104
  721. package/build-module/components/save-button/index.js.map +7 -1
  722. package/build-module/components/save-hub/index.js +23 -33
  723. package/build-module/components/save-hub/index.js.map +7 -1
  724. package/build-module/components/save-keyboard-shortcut/index.js +31 -47
  725. package/build-module/components/save-keyboard-shortcut/index.js.map +7 -1
  726. package/build-module/components/save-panel/index.js +125 -124
  727. package/build-module/components/save-panel/index.js.map +7 -1
  728. package/build-module/components/sidebar/index.js +47 -65
  729. package/build-module/components/sidebar/index.js.map +7 -1
  730. package/build-module/components/sidebar-button/index.js +16 -17
  731. package/build-module/components/sidebar-button/index.js.map +7 -1
  732. package/build-module/components/sidebar-dataviews/dataview-item.js +41 -50
  733. package/build-module/components/sidebar-dataviews/dataview-item.js.map +7 -1
  734. package/build-module/components/sidebar-dataviews/index.js +40 -48
  735. package/build-module/components/sidebar-dataviews/index.js.map +7 -1
  736. package/build-module/components/sidebar-global-styles-wrapper/index.js +100 -104
  737. package/build-module/components/sidebar-global-styles-wrapper/index.js.map +7 -1
  738. package/build-module/components/sidebar-navigation-item/index.js +56 -57
  739. package/build-module/components/sidebar-navigation-item/index.js.map +7 -1
  740. package/build-module/components/sidebar-navigation-screen/index.js +108 -98
  741. package/build-module/components/sidebar-navigation-screen/index.js.map +7 -1
  742. package/build-module/components/sidebar-navigation-screen-details-footer/index.js +36 -48
  743. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +7 -1
  744. package/build-module/components/sidebar-navigation-screen-global-styles/content.js +23 -28
  745. package/build-module/components/sidebar-navigation-screen-global-styles/content.js.map +7 -1
  746. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +61 -73
  747. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +7 -1
  748. package/build-module/components/sidebar-navigation-screen-main/index.js +108 -82
  749. package/build-module/components/sidebar-navigation-screen-main/index.js.map +7 -1
  750. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +22 -24
  751. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +7 -1
  752. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +92 -84
  753. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +7 -1
  754. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +87 -76
  755. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +7 -1
  756. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +28 -41
  757. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +7 -1
  758. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +67 -60
  759. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +7 -1
  760. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +37 -32
  761. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +7 -1
  762. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +107 -91
  763. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +7 -1
  764. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +14 -14
  765. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +7 -1
  766. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js +8 -12
  767. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +7 -1
  768. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +89 -98
  769. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +7 -1
  770. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +113 -117
  771. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +7 -1
  772. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +82 -82
  773. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +7 -1
  774. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +17 -16
  775. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +7 -1
  776. package/build-module/components/sidebar-navigation-screen-patterns/index.js +108 -99
  777. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +7 -1
  778. package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +19 -21
  779. package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +7 -1
  780. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +53 -59
  781. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +7 -1
  782. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +27 -27
  783. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +7 -1
  784. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +24 -24
  785. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +7 -1
  786. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +67 -70
  787. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +7 -1
  788. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +20 -21
  789. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +7 -1
  790. package/build-module/components/sidebar-navigation-screen-unsupported/index.js +11 -16
  791. package/build-module/components/sidebar-navigation-screen-unsupported/index.js.map +7 -1
  792. package/build-module/components/site-editor-routes/home.js +18 -26
  793. package/build-module/components/site-editor-routes/home.js.map +7 -1
  794. package/build-module/components/site-editor-routes/index.js +39 -30
  795. package/build-module/components/site-editor-routes/index.js.map +7 -1
  796. package/build-module/components/site-editor-routes/navigation-item.js +23 -43
  797. package/build-module/components/site-editor-routes/navigation-item.js.map +7 -1
  798. package/build-module/components/site-editor-routes/navigation.js +23 -43
  799. package/build-module/components/site-editor-routes/navigation.js.map +7 -1
  800. package/build-module/components/site-editor-routes/notfound.js +22 -28
  801. package/build-module/components/site-editor-routes/notfound.js.map +7 -1
  802. package/build-module/components/site-editor-routes/page-item.js +26 -35
  803. package/build-module/components/site-editor-routes/page-item.js.map +7 -1
  804. package/build-module/components/site-editor-routes/pages.js +64 -80
  805. package/build-module/components/site-editor-routes/pages.js.map +7 -1
  806. package/build-module/components/site-editor-routes/pattern-item.js +16 -20
  807. package/build-module/components/site-editor-routes/pattern-item.js.map +7 -1
  808. package/build-module/components/site-editor-routes/patterns.js +19 -30
  809. package/build-module/components/site-editor-routes/patterns.js.map +7 -1
  810. package/build-module/components/site-editor-routes/stylebook.js +28 -37
  811. package/build-module/components/site-editor-routes/stylebook.js.map +7 -1
  812. package/build-module/components/site-editor-routes/styles.js +26 -40
  813. package/build-module/components/site-editor-routes/styles.js.map +7 -1
  814. package/build-module/components/site-editor-routes/template-item.js +21 -28
  815. package/build-module/components/site-editor-routes/template-item.js.map +7 -1
  816. package/build-module/components/site-editor-routes/template-part-item.js +13 -15
  817. package/build-module/components/site-editor-routes/template-part-item.js.map +7 -1
  818. package/build-module/components/site-editor-routes/templates.js +37 -38
  819. package/build-module/components/site-editor-routes/templates.js.map +7 -1
  820. package/build-module/components/site-editor-routes/utils.js +6 -10
  821. package/build-module/components/site-editor-routes/utils.js.map +7 -1
  822. package/build-module/components/site-hub/index.js +204 -215
  823. package/build-module/components/site-hub/index.js.map +7 -1
  824. package/build-module/components/site-icon/index.js +33 -43
  825. package/build-module/components/site-icon/index.js.map +7 -1
  826. package/build-module/components/style-book/categories.js +41 -48
  827. package/build-module/components/style-book/categories.js.map +7 -1
  828. package/build-module/components/style-book/color-examples.js +29 -37
  829. package/build-module/components/style-book/color-examples.js.map +7 -1
  830. package/build-module/components/style-book/constants.js +191 -140
  831. package/build-module/components/style-book/constants.js.map +7 -1
  832. package/build-module/components/style-book/duotone-examples.js +36 -35
  833. package/build-module/components/style-book/duotone-examples.js.map +7 -1
  834. package/build-module/components/style-book/examples.js +114 -116
  835. package/build-module/components/style-book/examples.js.map +7 -1
  836. package/build-module/components/style-book/index.js +431 -384
  837. package/build-module/components/style-book/index.js.map +7 -1
  838. package/build-module/components/style-book/types.js +1 -2
  839. package/build-module/components/style-book/types.js.map +7 -1
  840. package/build-module/components/welcome-guide/editor.js +59 -54
  841. package/build-module/components/welcome-guide/editor.js.map +7 -1
  842. package/build-module/components/welcome-guide/image.js +16 -18
  843. package/build-module/components/welcome-guide/image.js.map +7 -1
  844. package/build-module/components/welcome-guide/index.js +16 -15
  845. package/build-module/components/welcome-guide/index.js.map +7 -1
  846. package/build-module/components/welcome-guide/page.js +59 -48
  847. package/build-module/components/welcome-guide/page.js.map +7 -1
  848. package/build-module/components/welcome-guide/styles.js +108 -97
  849. package/build-module/components/welcome-guide/styles.js.map +7 -1
  850. package/build-module/components/welcome-guide/template.js +54 -55
  851. package/build-module/components/welcome-guide/template.js.map +7 -1
  852. package/build-module/deprecated.js +28 -40
  853. package/build-module/deprecated.js.map +7 -1
  854. package/build-module/hooks/commands/use-common-commands.js +89 -108
  855. package/build-module/hooks/commands/use-common-commands.js.map +7 -1
  856. package/build-module/hooks/commands/use-set-command-context.js +21 -44
  857. package/build-module/hooks/commands/use-set-command-context.js.map +7 -1
  858. package/build-module/hooks/index.js +2 -5
  859. package/build-module/hooks/index.js.map +7 -1
  860. package/build-module/hooks/push-changes-to-global-styles/index.js +218 -243
  861. package/build-module/hooks/push-changes-to-global-styles/index.js.map +7 -1
  862. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +56 -105
  863. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +7 -1
  864. package/build-module/index.js +55 -69
  865. package/build-module/index.js.map +7 -1
  866. package/build-module/lock-unlock.js +8 -7
  867. package/build-module/lock-unlock.js.map +7 -1
  868. package/build-module/posts.js +38 -54
  869. package/build-module/posts.js.map +7 -1
  870. package/build-module/store/actions.js +140 -320
  871. package/build-module/store/actions.js.map +7 -1
  872. package/build-module/store/constants.js +5 -7
  873. package/build-module/store/constants.js.map +7 -1
  874. package/build-module/store/index.js +15 -18
  875. package/build-module/store/index.js.map +7 -1
  876. package/build-module/store/private-actions.js +12 -14
  877. package/build-module/store/private-actions.js.map +7 -1
  878. package/build-module/store/private-selectors.js +7 -10
  879. package/build-module/store/private-selectors.js.map +7 -1
  880. package/build-module/store/reducer.js +21 -53
  881. package/build-module/store/reducer.js.map +7 -1
  882. package/build-module/store/selectors.js +151 -278
  883. package/build-module/store/selectors.js.map +7 -1
  884. package/build-module/utils/constants.js +53 -44
  885. package/build-module/utils/constants.js.map +7 -1
  886. package/build-module/utils/get-filtered-template-parts.js +18 -37
  887. package/build-module/utils/get-filtered-template-parts.js.map +7 -1
  888. package/build-module/utils/is-previewing-theme.js +10 -9
  889. package/build-module/utils/is-previewing-theme.js.map +7 -1
  890. package/build-module/utils/is-template-removable.js +6 -13
  891. package/build-module/utils/is-template-removable.js.map +7 -1
  892. package/build-module/utils/is-template-revertable.js +6 -15
  893. package/build-module/utils/is-template-revertable.js.map +7 -1
  894. package/build-module/utils/set-nested-value.js +7 -22
  895. package/build-module/utils/set-nested-value.js.map +7 -1
  896. package/build-module/utils/template-part-create.js +1 -2
  897. package/build-module/utils/template-part-create.js.map +7 -1
  898. package/build-module/utils/use-activate-theme.js +21 -40
  899. package/build-module/utils/use-activate-theme.js.map +7 -1
  900. package/build-module/utils/use-actual-current-theme.js +13 -17
  901. package/build-module/utils/use-actual-current-theme.js.map +7 -1
  902. package/build-style/posts-rtl.css +484 -214
  903. package/build-style/posts.css +484 -214
  904. package/build-style/style-rtl.css +629 -271
  905. package/build-style/style.css +629 -271
  906. package/package.json +52 -42
  907. package/src/components/add-new-post/index.js +2 -1
  908. package/src/components/add-new-template/index.js +7 -4
  909. package/src/components/add-new-template/style.scss +4 -0
  910. package/src/components/dataviews-actions/index.js +16 -9
  911. package/src/components/editor/index.js +1 -1
  912. package/src/components/editor/style.scss +3 -0
  913. package/src/components/editor/use-resolve-edited-entity.js +4 -18
  914. package/src/components/editor-canvas-container/style.scss +4 -1
  915. package/src/components/global-styles/font-library-modal/style.scss +4 -0
  916. package/src/components/global-styles/screen-revisions/style.scss +4 -0
  917. package/src/components/global-styles/style.scss +3 -0
  918. package/src/components/global-styles/variations/style.scss +3 -0
  919. package/src/components/global-styles-sidebar/style.scss +3 -0
  920. package/src/components/layout/index.js +2 -1
  921. package/src/components/layout/style.scss +5 -0
  922. package/src/components/page-patterns/actions.js +54 -0
  923. package/src/components/page-patterns/index.js +79 -32
  924. package/src/components/page-patterns/style.scss +4 -0
  925. package/src/components/page-templates/fields.js +22 -1
  926. package/src/components/page-templates/index.js +71 -104
  927. package/src/components/page-templates/style.scss +4 -0
  928. package/src/components/page-templates/view-utils.js +41 -0
  929. package/src/components/pagination/style.scss +2 -0
  930. package/src/components/post-edit/index.js +10 -4
  931. package/src/components/post-edit/style.scss +3 -6
  932. package/src/components/post-list/index.js +76 -188
  933. package/src/components/post-list/style.scss +3 -0
  934. package/src/components/post-list/view-utils.js +155 -0
  935. package/src/components/posts-app-routes/posts.js +29 -16
  936. package/src/components/resizable-frame/style.scss +3 -0
  937. package/src/components/save-hub/style.scss +3 -0
  938. package/src/components/save-panel/index.js +2 -2
  939. package/src/components/save-panel/style.scss +2 -0
  940. package/src/components/sidebar/style.scss +4 -0
  941. package/src/components/sidebar-button/style.scss +2 -0
  942. package/src/components/sidebar-dataviews/dataview-item.js +5 -11
  943. package/src/components/sidebar-dataviews/index.js +17 -17
  944. package/src/components/sidebar-dataviews/style.scss +2 -16
  945. package/src/components/sidebar-global-styles-wrapper/index.js +16 -21
  946. package/src/components/sidebar-global-styles-wrapper/style.scss +4 -30
  947. package/src/components/sidebar-navigation-item/style.scss +3 -0
  948. package/src/components/sidebar-navigation-screen/style.scss +5 -0
  949. package/src/components/sidebar-navigation-screen-main/style.scss +2 -0
  950. package/src/components/sidebar-navigation-screen-navigation-menu/style.scss +2 -0
  951. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +3 -0
  952. package/src/components/sidebar-navigation-screen-patterns/style.scss +3 -0
  953. package/src/components/sidebar-navigation-screen-templates-browse/style.scss +2 -0
  954. package/src/components/site-editor-routes/pages.js +29 -16
  955. package/src/components/site-editor-routes/templates.js +21 -4
  956. package/src/components/site-hub/style.scss +3 -0
  957. package/src/components/site-icon/style.scss +3 -0
  958. package/src/components/style-book/style.scss +3 -0
  959. package/src/components/welcome-guide/style.scss +2 -0
  960. package/src/posts.scss +14 -11
  961. package/src/style.scss +42 -39
  962. package/tsconfig.json +2 -0
  963. package/tsconfig.tsbuildinfo +1 -1
  964. package/build/components/page/header.js +0 -45
  965. package/build/components/page/header.js.map +0 -1
  966. package/build/components/page/index.js +0 -50
  967. package/build/components/page/index.js.map +0 -1
  968. package/build/components/page-patterns/header.js +0 -96
  969. package/build/components/page-patterns/header.js.map +0 -1
  970. package/build/components/sidebar-dataviews/add-new-view.js +0 -137
  971. package/build/components/sidebar-dataviews/add-new-view.js.map +0 -1
  972. package/build/components/sidebar-dataviews/custom-dataviews-list.js +0 -211
  973. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +0 -1
  974. package/build/components/sidebar-dataviews/default-views.js +0 -141
  975. package/build/components/sidebar-dataviews/default-views.js.map +0 -1
  976. package/build-module/components/page/header.js +0 -40
  977. package/build-module/components/page/header.js.map +0 -1
  978. package/build-module/components/page/index.js +0 -42
  979. package/build-module/components/page/index.js.map +0 -1
  980. package/build-module/components/page-patterns/header.js +0 -88
  981. package/build-module/components/page-patterns/header.js.map +0 -1
  982. package/build-module/components/sidebar-dataviews/add-new-view.js +0 -129
  983. package/build-module/components/sidebar-dataviews/add-new-view.js.map +0 -1
  984. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +0 -202
  985. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +0 -1
  986. package/build-module/components/sidebar-dataviews/default-views.js +0 -133
  987. package/build-module/components/sidebar-dataviews/default-views.js.map +0 -1
  988. package/src/components/page/header.js +0 -44
  989. package/src/components/page/index.js +0 -43
  990. package/src/components/page/style.scss +0 -56
  991. package/src/components/page-patterns/header.js +0 -120
  992. package/src/components/sidebar-dataviews/add-new-view.js +0 -143
  993. package/src/components/sidebar-dataviews/custom-dataviews-list.js +0 -233
  994. package/src/components/sidebar-dataviews/default-views.js +0 -168
@@ -1 +1,7 @@
1
- {"version":3,"names":["Navigator","useNavigator","createSlotFill","DropdownMenu","MenuGroup","MenuItem","getBlockTypes","store","blocksStore","useSelect","useDispatch","privateApis","blockEditorPrivateApis","blockEditorStore","__","preferencesStore","moreVertical","coreStore","useEffect","usePrevious","ScreenRoot","useBlockHasGlobalStyles","default","ScreenBlockList","ScreenBlock","ScreenTypography","ScreenTypographyElement","FontSize","FontSizes","ScreenColors","ScreenColorPalette","ScreenBackground","ScreenShadows","ScreenShadowsEdit","ScreenLayout","ScreenStyleVariations","StyleBook","ScreenCSS","ScreenRevisions","unlock","editSiteStore","STYLE_BOOK_COLOR_GROUPS","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","SLOT_FILL_NAME","useGlobalStylesReset","Slot","GlobalStylesMenuSlot","Fill","GlobalStylesMenuFill","GlobalStylesActionMenu","canReset","onReset","toggle","canEditCSS","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","undefined","_links","setEditorCanvasContainerView","loadCustomCSS","children","icon","label","toggleProps","size","onClose","onClick","disabled","GlobalStylesNavigationScreen","className","props","Screen","filter","Boolean","join","BlockStylesNavigationScreens","parentMenu","blockStyles","blockName","map","style","index","path","name","variation","ContextScreens","blockStyleVariations","getBlockStyles","length","GlobalStylesStyleBook","navigator","location","isSelected","encodeURIComponent","startsWith","onSelect","find","group","slug","goTo","GlobalStylesBlockLink","selectedBlockName","selectedBlockClientId","getSelectedBlockClientId","getBlockName","clientId","blockHasGlobalStyles","currentPath","newPath","skipFocus","GlobalStylesEditorCanvasContainerLink","editorCanvasContainerView","getEditorCanvasContainerView","isRevisionsOpen","isBack","useNavigatorSync","parentPath","onPathChange","childPath","previousParentPath","previousChildPath","NavigationSync","GlobalStylesUI","blocks","initialPath","element","block"],"sources":["@wordpress/edit-site/src/components/global-styles/ui.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tNavigator,\n\tuseNavigator,\n\tcreateSlotFill,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n} from '@wordpress/components';\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useEffect } from '@wordpress/element';\nimport { usePrevious } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport ScreenRoot from './screen-root';\nimport {\n\tuseBlockHasGlobalStyles,\n\tdefault as ScreenBlockList,\n} from './screen-block-list';\nimport ScreenBlock from './screen-block';\nimport ScreenTypography from './screen-typography';\nimport ScreenTypographyElement from './screen-typography-element';\nimport FontSize from './font-sizes/font-size';\nimport FontSizes from './font-sizes/font-sizes';\nimport ScreenColors from './screen-colors';\nimport ScreenColorPalette from './screen-color-palette';\nimport ScreenBackground from './screen-background';\nimport { ScreenShadows, ScreenShadowsEdit } from './screen-shadows';\nimport ScreenLayout from './screen-layout';\nimport ScreenStyleVariations from './screen-style-variations';\nimport StyleBook from '../style-book';\nimport ScreenCSS from './screen-css';\nimport ScreenRevisions from './screen-revisions';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport { STYLE_BOOK_COLOR_GROUPS } from '../style-book/constants';\n\nconst SLOT_FILL_NAME = 'GlobalStylesMenu';\nconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\nconst { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =\n\tcreateSlotFill( SLOT_FILL_NAME );\n\nfunction GlobalStylesActionMenu() {\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst loadCustomCSS = () => {\n\t\tsetEditorCanvasContainerView( 'global-styles-css' );\n\t};\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t<DropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'More' ) }\n\t\t\t\ttoggleProps={ { size: 'compact' } }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ canEditCSS && (\n\t\t\t\t\t\t\t\t<MenuItem onClick={ loadCustomCSS }>\n\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\ttoggle(\n\t\t\t\t\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t\t\t\t\t'welcomeGuideStyles'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tdisabled={ ! canReset }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset styles' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction GlobalStylesNavigationScreen( { className, ...props } ) {\n\treturn (\n\t\t<Navigator.Screen\n\t\t\tclassName={ [\n\t\t\t\t'edit-site-global-styles-sidebar__navigator-screen',\n\t\t\t\tclassName,\n\t\t\t]\n\t\t\t\t.filter( Boolean )\n\t\t\t\t.join( ' ' ) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction BlockStylesNavigationScreens( {\n\tparentMenu,\n\tblockStyles,\n\tblockName,\n} ) {\n\treturn blockStyles.map( ( style, index ) => (\n\t\t<GlobalStylesNavigationScreen\n\t\t\tkey={ index }\n\t\t\tpath={ parentMenu + '/variations/' + style.name }\n\t\t>\n\t\t\t<ScreenBlock name={ blockName } variation={ style.name } />\n\t\t</GlobalStylesNavigationScreen>\n\t) );\n}\n\nfunction ContextScreens( { name, parentMenu = '' } ) {\n\tconst blockStyleVariations = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\tpath={ parentMenu + '/colors/palette' }\n\t\t\t>\n\t\t\t\t<ScreenColorPalette name={ name } />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ !! blockStyleVariations?.length && (\n\t\t\t\t<BlockStylesNavigationScreens\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\tblockStyles={ blockStyleVariations }\n\t\t\t\t\tblockName={ name }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction GlobalStylesStyleBook() {\n\tconst navigator = useNavigator();\n\tconst { path } = navigator.location;\n\treturn (\n\t\t<StyleBook\n\t\t\tisSelected={ ( blockName ) =>\n\t\t\t\t// Match '/blocks/core%2Fbutton' and\n\t\t\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t\t\t// '/blocks/core%2Fbuttons'.\n\t\t\t\tpath === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\t\tpath.startsWith(\n\t\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t\t)\n\t\t\t}\n\t\t\tonSelect={ ( blockName ) => {\n\t\t\t\tif (\n\t\t\t\t\tSTYLE_BOOK_COLOR_GROUPS.find(\n\t\t\t\t\t\t( group ) => group.slug === blockName\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\t// Go to color palettes Global Styles.\n\t\t\t\t\tnavigator.goTo( '/colors/palette' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( blockName === 'typography' ) {\n\t\t\t\t\t// Go to typography Global Styles.\n\t\t\t\t\tnavigator.goTo( '/typography' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Now go to the selected block.\n\t\t\t\tnavigator.goTo( '/blocks/' + encodeURIComponent( blockName ) );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction GlobalStylesBlockLink() {\n\tconst navigator = useNavigator();\n\tconst { selectedBlockName, selectedBlockClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSelectedBlockClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tselectedBlockName: getBlockName( clientId ),\n\t\t\t\tselectedBlockClientId: clientId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst blockHasGlobalStyles = useBlockHasGlobalStyles( selectedBlockName );\n\t// When we're in the `Blocks` screen enable deep linking to the selected block.\n\tuseEffect( () => {\n\t\tif ( ! selectedBlockClientId || ! blockHasGlobalStyles ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentPath = navigator.location.path;\n\t\tif (\n\t\t\tcurrentPath !== '/blocks' &&\n\t\t\t! currentPath.startsWith( '/blocks/' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst newPath = '/blocks/' + encodeURIComponent( selectedBlockName );\n\t\t// Avoid navigating to the same path. This can happen when selecting\n\t\t// a new block of the same type.\n\t\tif ( newPath !== currentPath ) {\n\t\t\tnavigator.goTo( newPath, { skipFocus: true } );\n\t\t}\n\t}, [ selectedBlockClientId, selectedBlockName, blockHasGlobalStyles ] );\n}\n\nfunction GlobalStylesEditorCanvasContainerLink() {\n\tconst { goTo, location } = useNavigator();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\tconst path = location?.path;\n\tconst isRevisionsOpen = path === '/revisions';\n\n\t// If the user switches the editor canvas container view, redirect\n\t// to the appropriate screen. This effectively allows deep linking to the\n\t// desired screens from outside the global styles navigation provider.\n\tuseEffect( () => {\n\t\tswitch ( editorCanvasContainerView ) {\n\t\t\tcase 'global-styles-revisions':\n\t\t\tcase 'global-styles-revisions:style-book':\n\t\t\t\tif ( ! isRevisionsOpen ) {\n\t\t\t\t\tgoTo( '/revisions' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'global-styles-css':\n\t\t\t\tgoTo( '/css' );\n\t\t\t\tbreak;\n\t\t\t// The stand-alone style book is open\n\t\t\t// and the revisions panel is open,\n\t\t\t// close the revisions panel.\n\t\t\t// Otherwise keep the style book open while\n\t\t\t// browsing global styles panel.\n\t\t\t//\n\t\t\t// Falling through as it matches the default scenario.\n\t\t\tcase 'style-book':\n\t\t\tdefault:\n\t\t\t\t// In general, if the revision screen is in view but the\n\t\t\t\t// `editorCanvasContainerView` is not a revision view, close it.\n\t\t\t\t// This also includes the scenario when the stand-alone style\n\t\t\t\t// book is open, in which case we want the user to close the\n\t\t\t\t// revisions screen and browse global styles.\n\t\t\t\tif ( isRevisionsOpen ) {\n\t\t\t\t\tgoTo( '/', { isBack: true } );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}, [ editorCanvasContainerView, isRevisionsOpen, goTo ] );\n}\n\nfunction useNavigatorSync( parentPath, onPathChange ) {\n\tconst navigator = useNavigator();\n\tconst { path: childPath } = navigator.location;\n\tconst previousParentPath = usePrevious( parentPath );\n\tconst previousChildPath = usePrevious( childPath );\n\tuseEffect( () => {\n\t\tif ( parentPath !== childPath ) {\n\t\t\tif ( parentPath !== previousParentPath ) {\n\t\t\t\tnavigator.goTo( parentPath );\n\t\t\t} else if ( childPath !== previousChildPath ) {\n\t\t\t\tonPathChange( childPath );\n\t\t\t}\n\t\t}\n\t}, [\n\t\tonPathChange,\n\t\tparentPath,\n\t\tpreviousChildPath,\n\t\tpreviousParentPath,\n\t\tchildPath,\n\t\tnavigator,\n\t] );\n}\n\n// This component is used to wrap the hook in order to conditionally execute it\n// when the parent component is used on controlled mode.\nfunction NavigationSync( { path: parentPath, onPathChange, children } ) {\n\tuseNavigatorSync( parentPath, onPathChange );\n\treturn children;\n}\n\nfunction GlobalStylesUI( { path, onPathChange } ) {\n\tconst blocks = getBlockTypes();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\n\treturn (\n\t\t<Navigator\n\t\t\tclassName=\"edit-site-global-styles-sidebar__navigator-provider\"\n\t\t\tinitialPath=\"/\"\n\t\t>\n\t\t\t{ path && onPathChange && (\n\t\t\t\t<NavigationSync path={ path } onPathChange={ onPathChange } />\n\t\t\t) }\n\t\t\t<GlobalStylesNavigationScreen path=\"/\">\n\t\t\t\t<ScreenRoot />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/variations\">\n\t\t\t\t<ScreenStyleVariations />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/blocks\">\n\t\t\t\t<ScreenBlockList />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography\">\n\t\t\t\t<ScreenTypography />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/font-sizes\">\n\t\t\t\t<FontSizes />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/font-sizes/:origin/:slug\">\n\t\t\t\t<FontSize />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/text\">\n\t\t\t\t<ScreenTypographyElement element=\"text\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/link\">\n\t\t\t\t<ScreenTypographyElement element=\"link\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/heading\">\n\t\t\t\t<ScreenTypographyElement element=\"heading\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/caption\">\n\t\t\t\t<ScreenTypographyElement element=\"caption\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/button\">\n\t\t\t\t<ScreenTypographyElement element=\"button\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/colors\">\n\t\t\t\t<ScreenColors />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/shadows\">\n\t\t\t\t<ScreenShadows />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/shadows/edit/:category/:slug\">\n\t\t\t\t<ScreenShadowsEdit />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/layout\">\n\t\t\t\t<ScreenLayout />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/css\">\n\t\t\t\t<ScreenCSS />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/revisions\">\n\t\t\t\t<ScreenRevisions />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/background\">\n\t\t\t\t<ScreenBackground />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\t\tkey={ 'menu-block-' + block.name }\n\t\t\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t>\n\t\t\t\t\t<ScreenBlock name={ block.name } />\n\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t) ) }\n\n\t\t\t<ContextScreens />\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<ContextScreens\n\t\t\t\t\tkey={ 'screens-block-' + block.name }\n\t\t\t\t\tname={ block.name }\n\t\t\t\t\tparentMenu={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t/>\n\t\t\t) ) }\n\n\t\t\t{ 'style-book' === editorCanvasContainerView && (\n\t\t\t\t<GlobalStylesStyleBook />\n\t\t\t) }\n\n\t\t\t<GlobalStylesActionMenu />\n\t\t\t<GlobalStylesBlockLink />\n\t\t\t<GlobalStylesEditorCanvasContainerLink />\n\t\t</Navigator>\n\t);\n}\nexport { GlobalStylesMenuSlot };\nexport default GlobalStylesUI;\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,SAAS,EACTC,YAAY,EACZC,cAAc,EACdC,YAAY,EACZC,SAAS,EACTC,QAAQ,QACF,uBAAuB;AAC9B,SAASC,aAAa,EAAEC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACvE,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SACCC,WAAW,IAAIC,sBAAsB,EACrCL,KAAK,IAAIM,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASP,KAAK,IAAIQ,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M;MACnBP,UAAU,EAAG,UAAU,GAAGiB,kBAAkB,CAAEiC,KAAK,CAAC3C,IAAK;IAAG,GAFtD,gBAAgB,GAAG2C,KAAK,CAAC3C,IAG/B,CACA,CAAC,EAED,YAAY,KAAK4B,yBAAyB,iBAC3C5E,IAAA,CAACsD,qBAAqB,IAAE,CACxB,eAEDtD,IAAA,CAACW,sBAAsB,IAAE,CAAC,eAC1BX,IAAA,CAACiE,qBAAqB,IAAE,CAAC,eACzBjE,IAAA,CAAC2E,qCAAqC,IAAE,CAAC;EAAA,CAC/B,CAAC;AAEd;AACA,SAASnE,oBAAoB;AAC7B,eAAe+E,cAAc","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/global-styles/ui.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tNavigator,\n\tuseNavigator,\n\tcreateSlotFill,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n} from '@wordpress/components';\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useEffect } from '@wordpress/element';\nimport { usePrevious } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport ScreenRoot from './screen-root';\nimport {\n\tuseBlockHasGlobalStyles,\n\tdefault as ScreenBlockList,\n} from './screen-block-list';\nimport ScreenBlock from './screen-block';\nimport ScreenTypography from './screen-typography';\nimport ScreenTypographyElement from './screen-typography-element';\nimport FontSize from './font-sizes/font-size';\nimport FontSizes from './font-sizes/font-sizes';\nimport ScreenColors from './screen-colors';\nimport ScreenColorPalette from './screen-color-palette';\nimport ScreenBackground from './screen-background';\nimport { ScreenShadows, ScreenShadowsEdit } from './screen-shadows';\nimport ScreenLayout from './screen-layout';\nimport ScreenStyleVariations from './screen-style-variations';\nimport StyleBook from '../style-book';\nimport ScreenCSS from './screen-css';\nimport ScreenRevisions from './screen-revisions';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport { STYLE_BOOK_COLOR_GROUPS } from '../style-book/constants';\n\nconst SLOT_FILL_NAME = 'GlobalStylesMenu';\nconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\nconst { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =\n\tcreateSlotFill( SLOT_FILL_NAME );\n\nfunction GlobalStylesActionMenu() {\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst loadCustomCSS = () => {\n\t\tsetEditorCanvasContainerView( 'global-styles-css' );\n\t};\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t<DropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'More' ) }\n\t\t\t\ttoggleProps={ { size: 'compact' } }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ canEditCSS && (\n\t\t\t\t\t\t\t\t<MenuItem onClick={ loadCustomCSS }>\n\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\ttoggle(\n\t\t\t\t\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t\t\t\t\t'welcomeGuideStyles'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tdisabled={ ! canReset }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset styles' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction GlobalStylesNavigationScreen( { className, ...props } ) {\n\treturn (\n\t\t<Navigator.Screen\n\t\t\tclassName={ [\n\t\t\t\t'edit-site-global-styles-sidebar__navigator-screen',\n\t\t\t\tclassName,\n\t\t\t]\n\t\t\t\t.filter( Boolean )\n\t\t\t\t.join( ' ' ) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction BlockStylesNavigationScreens( {\n\tparentMenu,\n\tblockStyles,\n\tblockName,\n} ) {\n\treturn blockStyles.map( ( style, index ) => (\n\t\t<GlobalStylesNavigationScreen\n\t\t\tkey={ index }\n\t\t\tpath={ parentMenu + '/variations/' + style.name }\n\t\t>\n\t\t\t<ScreenBlock name={ blockName } variation={ style.name } />\n\t\t</GlobalStylesNavigationScreen>\n\t) );\n}\n\nfunction ContextScreens( { name, parentMenu = '' } ) {\n\tconst blockStyleVariations = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\tpath={ parentMenu + '/colors/palette' }\n\t\t\t>\n\t\t\t\t<ScreenColorPalette name={ name } />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ !! blockStyleVariations?.length && (\n\t\t\t\t<BlockStylesNavigationScreens\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\tblockStyles={ blockStyleVariations }\n\t\t\t\t\tblockName={ name }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction GlobalStylesStyleBook() {\n\tconst navigator = useNavigator();\n\tconst { path } = navigator.location;\n\treturn (\n\t\t<StyleBook\n\t\t\tisSelected={ ( blockName ) =>\n\t\t\t\t// Match '/blocks/core%2Fbutton' and\n\t\t\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t\t\t// '/blocks/core%2Fbuttons'.\n\t\t\t\tpath === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\t\tpath.startsWith(\n\t\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t\t)\n\t\t\t}\n\t\t\tonSelect={ ( blockName ) => {\n\t\t\t\tif (\n\t\t\t\t\tSTYLE_BOOK_COLOR_GROUPS.find(\n\t\t\t\t\t\t( group ) => group.slug === blockName\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\t// Go to color palettes Global Styles.\n\t\t\t\t\tnavigator.goTo( '/colors/palette' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( blockName === 'typography' ) {\n\t\t\t\t\t// Go to typography Global Styles.\n\t\t\t\t\tnavigator.goTo( '/typography' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Now go to the selected block.\n\t\t\t\tnavigator.goTo( '/blocks/' + encodeURIComponent( blockName ) );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction GlobalStylesBlockLink() {\n\tconst navigator = useNavigator();\n\tconst { selectedBlockName, selectedBlockClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSelectedBlockClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tselectedBlockName: getBlockName( clientId ),\n\t\t\t\tselectedBlockClientId: clientId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst blockHasGlobalStyles = useBlockHasGlobalStyles( selectedBlockName );\n\t// When we're in the `Blocks` screen enable deep linking to the selected block.\n\tuseEffect( () => {\n\t\tif ( ! selectedBlockClientId || ! blockHasGlobalStyles ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentPath = navigator.location.path;\n\t\tif (\n\t\t\tcurrentPath !== '/blocks' &&\n\t\t\t! currentPath.startsWith( '/blocks/' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst newPath = '/blocks/' + encodeURIComponent( selectedBlockName );\n\t\t// Avoid navigating to the same path. This can happen when selecting\n\t\t// a new block of the same type.\n\t\tif ( newPath !== currentPath ) {\n\t\t\tnavigator.goTo( newPath, { skipFocus: true } );\n\t\t}\n\t}, [ selectedBlockClientId, selectedBlockName, blockHasGlobalStyles ] );\n}\n\nfunction GlobalStylesEditorCanvasContainerLink() {\n\tconst { goTo, location } = useNavigator();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\tconst path = location?.path;\n\tconst isRevisionsOpen = path === '/revisions';\n\n\t// If the user switches the editor canvas container view, redirect\n\t// to the appropriate screen. This effectively allows deep linking to the\n\t// desired screens from outside the global styles navigation provider.\n\tuseEffect( () => {\n\t\tswitch ( editorCanvasContainerView ) {\n\t\t\tcase 'global-styles-revisions':\n\t\t\tcase 'global-styles-revisions:style-book':\n\t\t\t\tif ( ! isRevisionsOpen ) {\n\t\t\t\t\tgoTo( '/revisions' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'global-styles-css':\n\t\t\t\tgoTo( '/css' );\n\t\t\t\tbreak;\n\t\t\t// The stand-alone style book is open\n\t\t\t// and the revisions panel is open,\n\t\t\t// close the revisions panel.\n\t\t\t// Otherwise keep the style book open while\n\t\t\t// browsing global styles panel.\n\t\t\t//\n\t\t\t// Falling through as it matches the default scenario.\n\t\t\tcase 'style-book':\n\t\t\tdefault:\n\t\t\t\t// In general, if the revision screen is in view but the\n\t\t\t\t// `editorCanvasContainerView` is not a revision view, close it.\n\t\t\t\t// This also includes the scenario when the stand-alone style\n\t\t\t\t// book is open, in which case we want the user to close the\n\t\t\t\t// revisions screen and browse global styles.\n\t\t\t\tif ( isRevisionsOpen ) {\n\t\t\t\t\tgoTo( '/', { isBack: true } );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}, [ editorCanvasContainerView, isRevisionsOpen, goTo ] );\n}\n\nfunction useNavigatorSync( parentPath, onPathChange ) {\n\tconst navigator = useNavigator();\n\tconst { path: childPath } = navigator.location;\n\tconst previousParentPath = usePrevious( parentPath );\n\tconst previousChildPath = usePrevious( childPath );\n\tuseEffect( () => {\n\t\tif ( parentPath !== childPath ) {\n\t\t\tif ( parentPath !== previousParentPath ) {\n\t\t\t\tnavigator.goTo( parentPath );\n\t\t\t} else if ( childPath !== previousChildPath ) {\n\t\t\t\tonPathChange( childPath );\n\t\t\t}\n\t\t}\n\t}, [\n\t\tonPathChange,\n\t\tparentPath,\n\t\tpreviousChildPath,\n\t\tpreviousParentPath,\n\t\tchildPath,\n\t\tnavigator,\n\t] );\n}\n\n// This component is used to wrap the hook in order to conditionally execute it\n// when the parent component is used on controlled mode.\nfunction NavigationSync( { path: parentPath, onPathChange, children } ) {\n\tuseNavigatorSync( parentPath, onPathChange );\n\treturn children;\n}\n\nfunction GlobalStylesUI( { path, onPathChange } ) {\n\tconst blocks = getBlockTypes();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\n\treturn (\n\t\t<Navigator\n\t\t\tclassName=\"edit-site-global-styles-sidebar__navigator-provider\"\n\t\t\tinitialPath=\"/\"\n\t\t>\n\t\t\t{ path && onPathChange && (\n\t\t\t\t<NavigationSync path={ path } onPathChange={ onPathChange } />\n\t\t\t) }\n\t\t\t<GlobalStylesNavigationScreen path=\"/\">\n\t\t\t\t<ScreenRoot />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/variations\">\n\t\t\t\t<ScreenStyleVariations />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/blocks\">\n\t\t\t\t<ScreenBlockList />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography\">\n\t\t\t\t<ScreenTypography />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/font-sizes\">\n\t\t\t\t<FontSizes />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/font-sizes/:origin/:slug\">\n\t\t\t\t<FontSize />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/text\">\n\t\t\t\t<ScreenTypographyElement element=\"text\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/link\">\n\t\t\t\t<ScreenTypographyElement element=\"link\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/heading\">\n\t\t\t\t<ScreenTypographyElement element=\"heading\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/caption\">\n\t\t\t\t<ScreenTypographyElement element=\"caption\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/button\">\n\t\t\t\t<ScreenTypographyElement element=\"button\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/colors\">\n\t\t\t\t<ScreenColors />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/shadows\">\n\t\t\t\t<ScreenShadows />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/shadows/edit/:category/:slug\">\n\t\t\t\t<ScreenShadowsEdit />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/layout\">\n\t\t\t\t<ScreenLayout />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/css\">\n\t\t\t\t<ScreenCSS />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/revisions\">\n\t\t\t\t<ScreenRevisions />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/background\">\n\t\t\t\t<ScreenBackground />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\t\tkey={ 'menu-block-' + block.name }\n\t\t\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t>\n\t\t\t\t\t<ScreenBlock name={ block.name } />\n\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t) ) }\n\n\t\t\t<ContextScreens />\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<ContextScreens\n\t\t\t\t\tkey={ 'screens-block-' + block.name }\n\t\t\t\t\tname={ block.name }\n\t\t\t\t\tparentMenu={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t/>\n\t\t\t) ) }\n\n\t\t\t{ 'style-book' === editorCanvasContainerView && (\n\t\t\t\t<GlobalStylesStyleBook />\n\t\t\t) }\n\n\t\t\t<GlobalStylesActionMenu />\n\t\t\t<GlobalStylesBlockLink />\n\t\t\t<GlobalStylesEditorCanvasContainerLink />\n\t\t</Navigator>\n\t);\n}\nexport { GlobalStylesMenuSlot };\nexport default GlobalStylesUI;\n"],
5
+ "mappings": "AAsFK,mBAGG,KAFF,YADD;AAnFL;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,eAAe,SAAS,mBAAmB;AACpD,SAAS,WAAW,mBAAmB;AACvC;AAAA,EACC,eAAe;AAAA,EACf,SAAS;AAAA,OACH;AACP,SAAS,UAAU;AACnB,SAAS,SAAS,wBAAwB;AAC1C,SAAS,oBAAoB;AAC7B,SAAS,SAAS,iBAAiB;AACnC,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB;AAK5B,OAAO,gBAAgB;AACvB;AAAA,EACC;AAAA,EACA,WAAW;AAAA,OACL;AACP,OAAO,iBAAiB;AACxB,OAAO,sBAAsB;AAC7B,OAAO,6BAA6B;AACpC,OAAO,cAAc;AACrB,OAAO,eAAe;AACtB,OAAO,kBAAkB;AACzB,OAAO,wBAAwB;AAC/B,OAAO,sBAAsB;AAC7B,SAAS,eAAe,yBAAyB;AACjD,OAAO,kBAAkB;AACzB,OAAO,2BAA2B;AAClC,OAAO,eAAe;AACtB,OAAO,eAAe;AACtB,OAAO,qBAAqB;AAC5B,SAAS,cAAc;AACvB,SAAS,S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ClC,8BAAC,oBAAiB,GACnB;AAAA,QAEE,OAAO,IAAK,CAAE,UACf;AAAA,UAAC;AAAA;AAAA,YAEA,MAAO,aAAa,mBAAoB,MAAM,IAAK;AAAA,YAEnD,8BAAC,eAAY,MAAO,MAAM,MAAO;AAAA;AAAA,UAH3B,gBAAgB,MAAM;AAAA,QAI7B,CACC;AAAA,QAEF,oBAAC,kBAAe;AAAA,QAEd,OAAO,IAAK,CAAE,UACf;AAAA,UAAC;AAAA;AAAA,YAEA,MAAO,MAAM;AAAA,YACb,YAAa,aAAa,mBAAoB,MAAM,IAAK;AAAA;AAAA,UAFnD,mBAAmB,MAAM;AAAA,QAGhC,CACC;AAAA,QAEA,iBAAiB,6BAClB,oBAAC,yBAAsB;AAAA,QAGxB,oBAAC,0BAAuB;AAAA,QACxB,oBAAC,yBAAsB;AAAA,QACvB,oBAAC,yCAAsC;AAAA;AAAA;AAAA,EACxC;AAEF;AAEA,IAAO,aAAQ;",
6
+ "names": []
7
+ }
@@ -1,30 +1,13 @@
1
- /**
2
- *
3
- * @param {string} variation The variation name.
4
- *
5
- * @return {string} The variation class name.
6
- */
7
- export function getVariationClassName(variation) {
1
+ function getVariationClassName(variation) {
8
2
  if (!variation) {
9
- return '';
3
+ return "";
10
4
  }
11
5
  return `is-style-${variation}`;
12
6
  }
13
-
14
- /**
15
- * Iterates through the presets array and searches for slugs that start with the specified
16
- * slugPrefix followed by a numerical suffix. It identifies the highest numerical suffix found
17
- * and returns one greater than the highest found suffix, ensuring that the new index is unique.
18
- *
19
- * @param {Array} presets The array of preset objects, each potentially containing a slug property.
20
- * @param {string} slugPrefix The prefix to look for in the preset slugs.
21
- *
22
- * @return {number} The next available index for a preset with the specified slug prefix, or 1 if no matching slugs are found.
23
- */
24
- export function getNewIndexFromPresets(presets, slugPrefix) {
7
+ function getNewIndexFromPresets(presets, slugPrefix) {
25
8
  const nameRegex = new RegExp(`^${slugPrefix}([\\d]+)$`);
26
9
  const highestPresetValue = presets.reduce((currentHighest, preset) => {
27
- if (typeof preset?.slug === 'string') {
10
+ if (typeof preset?.slug === "string") {
28
11
  const matches = preset?.slug.match(nameRegex);
29
12
  if (matches) {
30
13
  const id = parseInt(matches[1], 10);
@@ -41,11 +24,13 @@ function getFontFamilyFromSetting(fontFamilies, setting) {
41
24
  if (!Array.isArray(fontFamilies) || !setting) {
42
25
  return null;
43
26
  }
44
- const fontFamilyVariable = setting.replace('var(', '').replace(')', '');
45
- const fontFamilySlug = fontFamilyVariable?.split('--').slice(-1)[0];
46
- return fontFamilies.find(fontFamily => fontFamily.slug === fontFamilySlug);
27
+ const fontFamilyVariable = setting.replace("var(", "").replace(")", "");
28
+ const fontFamilySlug = fontFamilyVariable?.split("--").slice(-1)[0];
29
+ return fontFamilies.find(
30
+ (fontFamily) => fontFamily.slug === fontFamilySlug
31
+ );
47
32
  }
48
- export function getFontFamilies(themeJson) {
33
+ function getFontFamilies(themeJson) {
49
34
  const themeFontFamilies = themeJson?.settings?.typography?.fontFamilies?.theme;
50
35
  const customFontFamilies = themeJson?.settings?.typography?.fontFamilies?.custom;
51
36
  let fontFamilies = [];
@@ -57,14 +42,25 @@ export function getFontFamilies(themeJson) {
57
42
  fontFamilies = customFontFamilies;
58
43
  }
59
44
  const bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily;
60
- const bodyFontFamily = getFontFamilyFromSetting(fontFamilies, bodyFontFamilySetting);
45
+ const bodyFontFamily = getFontFamilyFromSetting(
46
+ fontFamilies,
47
+ bodyFontFamilySetting
48
+ );
61
49
  const headingFontFamilySetting = themeJson?.styles?.elements?.heading?.typography?.fontFamily;
62
50
  let headingFontFamily;
63
51
  if (!headingFontFamilySetting) {
64
52
  headingFontFamily = bodyFontFamily;
65
53
  } else {
66
- headingFontFamily = getFontFamilyFromSetting(fontFamilies, themeJson?.styles?.elements?.heading?.typography?.fontFamily);
54
+ headingFontFamily = getFontFamilyFromSetting(
55
+ fontFamilies,
56
+ themeJson?.styles?.elements?.heading?.typography?.fontFamily
57
+ );
67
58
  }
68
59
  return [bodyFontFamily, headingFontFamily];
69
60
  }
70
- //# sourceMappingURL=utils.js.map
61
+ export {
62
+ getFontFamilies,
63
+ getNewIndexFromPresets,
64
+ getVariationClassName
65
+ };
66
+ //# sourceMappingURL=utils.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["getVariationClassName","variation","getNewIndexFromPresets","presets","slugPrefix","nameRegex","RegExp","highestPresetValue","reduce","currentHighest","preset","slug","matches","match","id","parseInt","getFontFamilyFromSetting","fontFamilies","setting","Array","isArray","fontFamilyVariable","replace","fontFamilySlug","split","slice","find","fontFamily","getFontFamilies","themeJson","themeFontFamilies","settings","typography","theme","customFontFamilies","custom","bodyFontFamilySetting","styles","bodyFontFamily","headingFontFamilySetting","elements","heading","headingFontFamily"],"sources":["@wordpress/edit-site/src/components/global-styles/utils.js"],"sourcesContent":["/**\n *\n * @param {string} variation The variation name.\n *\n * @return {string} The variation class name.\n */\nexport function getVariationClassName( variation ) {\n\tif ( ! variation ) {\n\t\treturn '';\n\t}\n\treturn `is-style-${ variation }`;\n}\n\n/**\n * Iterates through the presets array and searches for slugs that start with the specified\n * slugPrefix followed by a numerical suffix. It identifies the highest numerical suffix found\n * and returns one greater than the highest found suffix, ensuring that the new index is unique.\n *\n * @param {Array} presets The array of preset objects, each potentially containing a slug property.\n * @param {string} slugPrefix The prefix to look for in the preset slugs.\n *\n * @return {number} The next available index for a preset with the specified slug prefix, or 1 if no matching slugs are found.\n */\nexport function getNewIndexFromPresets( presets, slugPrefix ) {\n\tconst nameRegex = new RegExp( `^${ slugPrefix }([\\\\d]+)$` );\n\tconst highestPresetValue = presets.reduce( ( currentHighest, preset ) => {\n\t\tif ( typeof preset?.slug === 'string' ) {\n\t\t\tconst matches = preset?.slug.match( nameRegex );\n\t\t\tif ( matches ) {\n\t\t\t\tconst id = parseInt( matches[ 1 ], 10 );\n\t\t\t\tif ( id > currentHighest ) {\n\t\t\t\t\treturn id;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn currentHighest;\n\t}, 0 );\n\treturn highestPresetValue + 1;\n}\n\nfunction getFontFamilyFromSetting( fontFamilies, setting ) {\n\tif ( ! Array.isArray( fontFamilies ) || ! setting ) {\n\t\treturn null;\n\t}\n\n\tconst fontFamilyVariable = setting.replace( 'var(', '' ).replace( ')', '' );\n\tconst fontFamilySlug = fontFamilyVariable?.split( '--' ).slice( -1 )[ 0 ];\n\n\treturn fontFamilies.find(\n\t\t( fontFamily ) => fontFamily.slug === fontFamilySlug\n\t);\n}\n\nexport function getFontFamilies( themeJson ) {\n\tconst themeFontFamilies =\n\t\tthemeJson?.settings?.typography?.fontFamilies?.theme;\n\tconst customFontFamilies =\n\t\tthemeJson?.settings?.typography?.fontFamilies?.custom;\n\n\tlet fontFamilies = [];\n\tif ( themeFontFamilies && customFontFamilies ) {\n\t\tfontFamilies = [ ...themeFontFamilies, ...customFontFamilies ];\n\t} else if ( themeFontFamilies ) {\n\t\tfontFamilies = themeFontFamilies;\n\t} else if ( customFontFamilies ) {\n\t\tfontFamilies = customFontFamilies;\n\t}\n\tconst bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily;\n\tconst bodyFontFamily = getFontFamilyFromSetting(\n\t\tfontFamilies,\n\t\tbodyFontFamilySetting\n\t);\n\n\tconst headingFontFamilySetting =\n\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily;\n\n\tlet headingFontFamily;\n\tif ( ! headingFontFamilySetting ) {\n\t\theadingFontFamily = bodyFontFamily;\n\t} else {\n\t\theadingFontFamily = getFontFamilyFromSetting(\n\t\t\tfontFamilies,\n\t\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily\n\t\t);\n\t}\n\n\treturn [ bodyFontFamily, headingFontFamily ];\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,qBAAqBA,CAAEC,SAAS,EAAG;EAClD,IAAK,CAAEA,SAAS,EAAG;IAClB,OAAO,EAAE;EACV;EACA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,SAAS,EAAG;EAC5C,MAAMC,iBAAiB,GACtBD,SAAS,EAAEE,QAAQ,EAAEC,UAAU,EAAEf,YAAY,EAAEgB,KAAK;EACrD,MAAMC,kBAAkB,GACvBL,SAAS,EAAEE,QAAQ,EAAEC,UAAU,EAAEf,YAAY,EAAEkB,MAAM;EAEtD,IAAIlB,YAAY,GAAG,EAAE;EACrB,IAAKa,iBAAiB,IAAII,kBAAkB,EAAG;IAC9CjB,YAAY,GAAG,CAAE,GAAGa,iBAAiB,EAAE,GAAGI,kBAAkB,CAAE;EAC/D,CAAC,MAAM,IAAKJ,iBAAiB,EAAG;IAC/Bb,YAAY,GAAGa,iBAAiB;EACjC,CAAC,MAAM,IAAKI,kBAAkB,EAAG;IAChCjB,YAAY,GAAGiB,kBAAkB;EAClC;EACA,MAAME,qBAAqB,GAAGP,SAAS,EAAEQ,MAAM,EAAEL,UAAU,EAAEL,UAAU;EACvE,MAAMW,cAAc,GAAGtB,wBAAwB,CAC9CC,YAAY,EACZmB,qBACD,CAAC;EAED,MAAMG,wBAAwB,GAC7BV,SAAS,EAAEQ,MAAM,EAAEG,QAAQ,EAAEC,OAAO,EAAET,UAAU,EAAEL,UAAU;EAE7D,IAAIe,iBAAiB;EACrB,IAAK,CAAEH,wBAAwB,EAAG;IACjCG,iBAAiB,GAAGJ,cAAc;EACnC,CAAC,MAAM;IACNI,iBAAiB,GAAG1B,wBAAwB,CAC3CC,YAAY,EACZY,SAAS,EAAEQ,MAAM,EAAEG,QAAQ,EAAEC,OAAO,EAAET,UAAU,EAAEL,UACnD,CAAC;EACF;EAEA,OAAO,CAAEW,cAAc,EAAEI,iBAAiB,CAAE;AAC7C","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/global-styles/utils.js"],
4
+ "sourcesContent": ["/**\n *\n * @param {string} variation The variation name.\n *\n * @return {string} The variation class name.\n */\nexport function getVariationClassName( variation ) {\n\tif ( ! variation ) {\n\t\treturn '';\n\t}\n\treturn `is-style-${ variation }`;\n}\n\n/**\n * Iterates through the presets array and searches for slugs that start with the specified\n * slugPrefix followed by a numerical suffix. It identifies the highest numerical suffix found\n * and returns one greater than the highest found suffix, ensuring that the new index is unique.\n *\n * @param {Array} presets The array of preset objects, each potentially containing a slug property.\n * @param {string} slugPrefix The prefix to look for in the preset slugs.\n *\n * @return {number} The next available index for a preset with the specified slug prefix, or 1 if no matching slugs are found.\n */\nexport function getNewIndexFromPresets( presets, slugPrefix ) {\n\tconst nameRegex = new RegExp( `^${ slugPrefix }([\\\\d]+)$` );\n\tconst highestPresetValue = presets.reduce( ( currentHighest, preset ) => {\n\t\tif ( typeof preset?.slug === 'string' ) {\n\t\t\tconst matches = preset?.slug.match( nameRegex );\n\t\t\tif ( matches ) {\n\t\t\t\tconst id = parseInt( matches[ 1 ], 10 );\n\t\t\t\tif ( id > currentHighest ) {\n\t\t\t\t\treturn id;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn currentHighest;\n\t}, 0 );\n\treturn highestPresetValue + 1;\n}\n\nfunction getFontFamilyFromSetting( fontFamilies, setting ) {\n\tif ( ! Array.isArray( fontFamilies ) || ! setting ) {\n\t\treturn null;\n\t}\n\n\tconst fontFamilyVariable = setting.replace( 'var(', '' ).replace( ')', '' );\n\tconst fontFamilySlug = fontFamilyVariable?.split( '--' ).slice( -1 )[ 0 ];\n\n\treturn fontFamilies.find(\n\t\t( fontFamily ) => fontFamily.slug === fontFamilySlug\n\t);\n}\n\nexport function getFontFamilies( themeJson ) {\n\tconst themeFontFamilies =\n\t\tthemeJson?.settings?.typography?.fontFamilies?.theme;\n\tconst customFontFamilies =\n\t\tthemeJson?.settings?.typography?.fontFamilies?.custom;\n\n\tlet fontFamilies = [];\n\tif ( themeFontFamilies && customFontFamilies ) {\n\t\tfontFamilies = [ ...themeFontFamilies, ...customFontFamilies ];\n\t} else if ( themeFontFamilies ) {\n\t\tfontFamilies = themeFontFamilies;\n\t} else if ( customFontFamilies ) {\n\t\tfontFamilies = customFontFamilies;\n\t}\n\tconst bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily;\n\tconst bodyFontFamily = getFontFamilyFromSetting(\n\t\tfontFamilies,\n\t\tbodyFontFamilySetting\n\t);\n\n\tconst headingFontFamilySetting =\n\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily;\n\n\tlet headingFontFamily;\n\tif ( ! headingFontFamilySetting ) {\n\t\theadingFontFamily = bodyFontFamily;\n\t} else {\n\t\theadingFontFamily = getFontFamilyFromSetting(\n\t\t\tfontFamilies,\n\t\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily\n\t\t);\n\t}\n\n\treturn [ bodyFontFamily, headingFontFamily ];\n}\n"],
5
+ "mappings": "AAMO,SAAS,sBAAuB,WAAY;AAClD,MAAK,CAAE,WAAY;AAClB,WAAO;AAAA,EACR;AACA,SAAO,YAAa,SAAU;AAC/B;AAYO,SAAS,uBAAwB,SAAS,YAAa;AAC7D,QAAM,YAAY,IAAI,OAAQ,IAAK,UAAW,WAAY;AAC1D,QAAM,qBAAqB,QAAQ,OAAQ,CAAE,gBAAgB,WAAY;AACxE,QAAK,OAAO,QAAQ,SAAS,UAAW;AACvC,YAAM,UAAU,QAAQ,KAAK,MAAO,SAAU;AAC9C,UAAK,SAAU;AACd,cAAM,KAAK,SAAU,QAAS,CAAE,GAAG,EAAG;AACtC,YAAK,KAAK,gBAAiB;AAC1B,iBAAO;AAAA,QACR;AAAA,MACD;AAAA,IACD;AACA,WAAO;AAAA,EACR,GAAG,CAAE;AACL,SAAO,qBAAqB;AAC7B;AAEA,SAAS,yBAA0B,cAAc,SAAU;AAC1D,MAAK,CAAE,MAAM,QAAS,YAAa,KAAK,CAAE,SAAU;AACnD,WAAO;AAAA,EACR;AAEA,QAAM,qBAAqB,QAAQ,QAAS,QAAQ,EAAG,EAAE,QAAS,KAAK,EAAG;AAC1E,QAAM,iBAAiB,oBAAoB,MAAO,IAAK,EAAE,MAAO,EAAG,EAAG,CAAE;AAExE,SAAO,aAAa;AAAA,IACnB,CAAE,eAAgB,WAAW,SAAS;AAAA,EACvC;AACD;AAEO,SAAS,gBAAiB,WAAY;AAC5C,QAAM,oBACL,WAAW,UAAU,YAAY,cAAc;AAChD,QAAM,qBACL,WAAW,UAAU,YAAY,cAAc;AAEhD,MAAI,eAAe,CAAC;AACpB,MAAK,qBAAqB,oBAAqB;AAC9C,mBAAe,CAAE,GAAG,mBAAmB,GAAG,kBAAmB;AAAA,EAC9D,WAAY,mBAAoB;AAC/B,mBAAe;AAAA,EAChB,WAAY,oBAAqB;AAChC,mBAAe;AAAA,EAChB;AACA,QAAM,wBAAwB,WAAW,QAAQ,YAAY;AAC7D,QAAM,iBAAiB;AAAA,IACtB;AAAA,IACA;AAAA,EACD;AAEA,QAAM,2BACL,WAAW,QAAQ,UAAU,SAAS,YAAY;AAEnD,MAAI;AACJ,MAAK,CAAE,0BAA2B;AACjC,wBAAoB;AAAA,EACrB,OAAO;AACN,wBAAoB;AAAA,MACnB;AAAA,MACA,WAAW,QAAQ,UAAU,SAAS,YAAY;AAAA,IACnD;AAAA,EACD;AAEA,SAAO,CAAE,gBAAgB,iBAAkB;AAC5C;",
6
+ "names": []
7
+ }
@@ -1,32 +1,18 @@
1
- /**
2
- * External dependencies
3
- */
4
- import clsx from 'clsx';
5
-
6
- /**
7
- * WordPress dependencies
8
- */
9
- import { Tooltip } from '@wordpress/components';
10
- import { useMemo, useContext, useState } from '@wordpress/element';
11
- import { ENTER } from '@wordpress/keycodes';
12
- import { _x, sprintf } from '@wordpress/i18n';
13
- import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
14
- import { privateApis as editorPrivateApis } from '@wordpress/editor';
15
-
16
- /**
17
- * Internal dependencies
18
- */
19
- import { filterObjectByProperties } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';
20
- import { unlock } from '../../../lock-unlock';
21
- import { jsx as _jsx } from "react/jsx-runtime";
22
- const {
23
- mergeBaseAndUserConfigs
24
- } = unlock(editorPrivateApis);
25
- const {
26
- GlobalStylesContext,
27
- areGlobalStyleConfigsEqual
28
- } = unlock(blockEditorPrivateApis);
29
- export default function Variation({
1
+ import { jsx } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { Tooltip } from "@wordpress/components";
4
+ import { useMemo, useContext, useState } from "@wordpress/element";
5
+ import { ENTER } from "@wordpress/keycodes";
6
+ import { _x, sprintf } from "@wordpress/i18n";
7
+ import { privateApis as blockEditorPrivateApis } from "@wordpress/block-editor";
8
+ import { privateApis as editorPrivateApis } from "@wordpress/editor";
9
+ import { filterObjectByProperties } from "../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property";
10
+ import { unlock } from "../../../lock-unlock";
11
+ const { mergeBaseAndUserConfigs } = unlock(editorPrivateApis);
12
+ const { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(
13
+ blockEditorPrivateApis
14
+ );
15
+ function Variation({
30
16
  variation,
31
17
  children,
32
18
  isPill,
@@ -34,11 +20,7 @@ export default function Variation({
34
20
  showTooltip
35
21
  }) {
36
22
  const [isFocused, setIsFocused] = useState(false);
37
- const {
38
- base,
39
- user,
40
- setUserConfig
41
- } = useContext(GlobalStylesContext);
23
+ const { base, user, setUserConfig } = useContext(GlobalStylesContext);
42
24
  const context = useMemo(() => {
43
25
  let merged = mergeBaseAndUserConfigs(base, variation);
44
26
  if (properties) {
@@ -48,47 +30,59 @@ export default function Variation({
48
30
  user: variation,
49
31
  base,
50
32
  merged,
51
- setUserConfig: () => {}
33
+ setUserConfig: () => {
34
+ }
52
35
  };
53
36
  }, [variation, base, properties]);
54
37
  const selectVariation = () => setUserConfig(variation);
55
- const selectOnEnter = event => {
38
+ const selectOnEnter = (event) => {
56
39
  if (event.keyCode === ENTER) {
57
40
  event.preventDefault();
58
41
  selectVariation();
59
42
  }
60
43
  };
61
- const isActive = useMemo(() => areGlobalStyleConfigsEqual(user, variation), [user, variation]);
44
+ const isActive = useMemo(
45
+ () => areGlobalStyleConfigsEqual(user, variation),
46
+ [user, variation]
47
+ );
62
48
  let label = variation?.title;
63
49
  if (variation?.description) {
64
- label = sprintf(/* translators: 1: variation title. 2: variation description. */
65
- _x('%1$s (%2$s)', 'variation label'), variation?.title, variation?.description);
50
+ label = sprintf(
51
+ /* translators: 1: variation title. 2: variation description. */
52
+ _x("%1$s (%2$s)", "variation label"),
53
+ variation?.title,
54
+ variation?.description
55
+ );
66
56
  }
67
- const content = /*#__PURE__*/_jsx("div", {
68
- className: clsx('edit-site-global-styles-variations_item', {
69
- 'is-active': isActive
70
- }),
71
- role: "button",
72
- onClick: selectVariation,
73
- onKeyDown: selectOnEnter,
74
- tabIndex: "0",
75
- "aria-label": label,
76
- "aria-current": isActive,
77
- onFocus: () => setIsFocused(true),
78
- onBlur: () => setIsFocused(false),
79
- children: /*#__PURE__*/_jsx("div", {
80
- className: clsx('edit-site-global-styles-variations_item-preview', {
81
- 'is-pill': isPill
57
+ const content = /* @__PURE__ */ jsx(
58
+ "div",
59
+ {
60
+ className: clsx("edit-site-global-styles-variations_item", {
61
+ "is-active": isActive
82
62
  }),
83
- children: children(isFocused)
84
- })
85
- });
86
- return /*#__PURE__*/_jsx(GlobalStylesContext.Provider, {
87
- value: context,
88
- children: showTooltip ? /*#__PURE__*/_jsx(Tooltip, {
89
- text: variation?.title,
90
- children: content
91
- }) : content
92
- });
63
+ role: "button",
64
+ onClick: selectVariation,
65
+ onKeyDown: selectOnEnter,
66
+ tabIndex: "0",
67
+ "aria-label": label,
68
+ "aria-current": isActive,
69
+ onFocus: () => setIsFocused(true),
70
+ onBlur: () => setIsFocused(false),
71
+ children: /* @__PURE__ */ jsx(
72
+ "div",
73
+ {
74
+ className: clsx(
75
+ "edit-site-global-styles-variations_item-preview",
76
+ { "is-pill": isPill }
77
+ ),
78
+ children: children(isFocused)
79
+ }
80
+ )
81
+ }
82
+ );
83
+ return /* @__PURE__ */ jsx(GlobalStylesContext.Provider, { value: context, children: showTooltip ? /* @__PURE__ */ jsx(Tooltip, { text: variation?.title, children: content }) : content });
93
84
  }
94
- //# sourceMappingURL=variation.js.map
85
+ export {
86
+ Variation as default
87
+ };
88
+ //# sourceMappingURL=variation.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["clsx","Tooltip","useMemo","useContext","useState","ENTER","_x","sprintf","privateApis","blockEditorPrivateApis","editorPrivateApis","filterObjectByProperties","unlock","jsx","_jsx","mergeBaseAndUserConfigs","GlobalStylesContext","areGlobalStyleConfigsEqual","Variation","variation","children","isPill","properties","showTooltip","isFocused","setIsFocused","base","user","setUserConfig","context","merged","selectVariation","selectOnEnter","event","keyCode","preventDefault","isActive","label","title","description","content","className","role","onClick","onKeyDown","tabIndex","onFocus","onBlur","Provider","value","text"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variation.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Tooltip } from '@wordpress/components';\nimport { useMemo, useContext, useState } from '@wordpress/element';\nimport { ENTER } from '@wordpress/keycodes';\nimport { _x, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { filterObjectByProperties } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';\nimport { unlock } from '../../../lock-unlock';\n\nconst { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nexport default function Variation( {\n\tvariation,\n\tchildren,\n\tisPill,\n\tproperties,\n\tshowTooltip,\n} ) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst { base, user, setUserConfig } = useContext( GlobalStylesContext );\n\n\tconst context = useMemo( () => {\n\t\tlet merged = mergeBaseAndUserConfigs( base, variation );\n\t\tif ( properties ) {\n\t\t\tmerged = filterObjectByProperties( merged, properties );\n\t\t}\n\t\treturn {\n\t\t\tuser: variation,\n\t\t\tbase,\n\t\t\tmerged,\n\t\t\tsetUserConfig: () => {},\n\t\t};\n\t}, [ variation, base, properties ] );\n\n\tconst selectVariation = () => setUserConfig( variation );\n\n\tconst selectOnEnter = ( event ) => {\n\t\tif ( event.keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\t\t\tselectVariation();\n\t\t}\n\t};\n\n\tconst isActive = useMemo(\n\t\t() => areGlobalStyleConfigsEqual( user, variation ),\n\t\t[ user, variation ]\n\t);\n\n\tlet label = variation?.title;\n\tif ( variation?.description ) {\n\t\tlabel = sprintf(\n\t\t\t/* translators: 1: variation title. 2: variation description. */\n\t\t\t_x( '%1$s (%2$s)', 'variation label' ),\n\t\t\tvariation?.title,\n\t\t\tvariation?.description\n\t\t);\n\t}\n\n\tconst content = (\n\t\t<div\n\t\t\tclassName={ clsx( 'edit-site-global-styles-variations_item', {\n\t\t\t\t'is-active': isActive,\n\t\t\t} ) }\n\t\t\trole=\"button\"\n\t\t\tonClick={ selectVariation }\n\t\t\tonKeyDown={ selectOnEnter }\n\t\t\ttabIndex=\"0\"\n\t\t\taria-label={ label }\n\t\t\taria-current={ isActive }\n\t\t\tonFocus={ () => setIsFocused( true ) }\n\t\t\tonBlur={ () => setIsFocused( false ) }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t'edit-site-global-styles-variations_item-preview',\n\t\t\t\t\t{ 'is-pill': isPill }\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t{ children( isFocused ) }\n\t\t\t</div>\n\t\t</div>\n\t);\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ context }>\n\t\t\t{ showTooltip ? (\n\t\t\t\t<Tooltip text={ variation?.title }>{ content }</Tooltip>\n\t\t\t) : (\n\t\t\t\tcontent\n\t\t\t) }\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;A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,EAAGpB,OAAS;IAAAT,QAAA,EAC5CG,WAAW,gBACZT,IAAA,CAACb,OAAO;MAACiD,IAAI,EAAG/B,SAAS,EAAEmB,KAAO;MAAAlB,QAAA,EAAGoB;IAAO,CAAW,CAAC,GAExDA;EACA,CAC4B,CAAC;AAEjC","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/components/global-styles/variations/variation.js"],
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Tooltip } from '@wordpress/components';\nimport { useMemo, useContext, useState } from '@wordpress/element';\nimport { ENTER } from '@wordpress/keycodes';\nimport { _x, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { filterObjectByProperties } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';\nimport { unlock } from '../../../lock-unlock';\n\nconst { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nexport default function Variation( {\n\tvariation,\n\tchildren,\n\tisPill,\n\tproperties,\n\tshowTooltip,\n} ) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst { base, user, setUserConfig } = useContext( GlobalStylesContext );\n\n\tconst context = useMemo( () => {\n\t\tlet merged = mergeBaseAndUserConfigs( base, variation );\n\t\tif ( properties ) {\n\t\t\tmerged = filterObjectByProperties( merged, properties );\n\t\t}\n\t\treturn {\n\t\t\tuser: variation,\n\t\t\tbase,\n\t\t\tmerged,\n\t\t\tsetUserConfig: () => {},\n\t\t};\n\t}, [ variation, base, properties ] );\n\n\tconst selectVariation = () => setUserConfig( variation );\n\n\tconst selectOnEnter = ( event ) => {\n\t\tif ( event.keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\t\t\tselectVariation();\n\t\t}\n\t};\n\n\tconst isActive = useMemo(\n\t\t() => areGlobalStyleConfigsEqual( user, variation ),\n\t\t[ user, variation ]\n\t);\n\n\tlet label = variation?.title;\n\tif ( variation?.description ) {\n\t\tlabel = sprintf(\n\t\t\t/* translators: 1: variation title. 2: variation description. */\n\t\t\t_x( '%1$s (%2$s)', 'variation label' ),\n\t\t\tvariation?.title,\n\t\t\tvariation?.description\n\t\t);\n\t}\n\n\tconst content = (\n\t\t<div\n\t\t\tclassName={ clsx( 'edit-site-global-styles-variations_item', {\n\t\t\t\t'is-active': isActive,\n\t\t\t} ) }\n\t\t\trole=\"button\"\n\t\t\tonClick={ selectVariation }\n\t\t\tonKeyDown={ selectOnEnter }\n\t\t\ttabIndex=\"0\"\n\t\t\taria-label={ label }\n\t\t\taria-current={ isActive }\n\t\t\tonFocus={ () => setIsFocused( true ) }\n\t\t\tonBlur={ () => setIsFocused( false ) }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t'edit-site-global-styles-variations_item-preview',\n\t\t\t\t\t{ 'is-pill': isPill }\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t{ children( isFocused ) }\n\t\t\t</div>\n\t\t</div>\n\t);\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ context }>\n\t\t\t{ showTooltip ? (\n\t\t\t\t<Tooltip text={ variation?.title }>{ content }</Tooltip>\n\t\t\t) : (\n\t\t\t\tcontent\n\t\t\t) }\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n"],
5
+ "mappings": "AAuFG;AApFH,OAAO,UAAU;AAKjB,SAAS,eAAe;AACxB,SAAS,SAAS,YAAY,gBAAgB;AAC9C,SAAS,aAAa;AACtB,SAAS,IAAI,eAAe;AAC5B,SAAS,eAAe,8BAA8B;AACtD,SAAS,eAAe,yBAAyB;AAKjD,SAAS,gCAAgC;AACzC,SAAS,cAAc;AAEvB,MAAM,EAAE,wBAAwB,IAAI,OAAQ,iBAAkB;AAC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;AAAA,QAAC;AAAA;AAAA,UACA,WAAY;AAAA,YACX;AAAA,YACA,EAAE,WAAW,OAAO;AAAA,UACrB;AAAA,UAEE,mBAAU,SAAU;AAAA;AAAA,MACvB;AAAA;AAAA,EACD;AAGD,SACC,oBAAC,oBAAoB,UAApB,EAA6B,OAAQ,SACnC,wBACD,oBAAC,WAAQ,MAAO,WAAW,OAAU,mBAAS,IAE9C,SAEF;AAEF;",
6
+ "names": []
7
+ }
@@ -1,42 +1,34 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { __experimentalGrid as Grid, __experimentalVStack as VStack } from '@wordpress/components';
5
-
6
- /**
7
- * Internal dependencies
8
- */
9
- import StylesPreviewColors from '../preview-colors';
10
- import { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';
11
- import Subtitle from '../subtitle';
12
- import Variation from './variation';
13
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
- export default function ColorVariations({
15
- title,
16
- gap = 2
17
- }) {
18
- const propertiesToFilter = ['color'];
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import {
3
+ __experimentalGrid as Grid,
4
+ __experimentalVStack as VStack
5
+ } from "@wordpress/components";
6
+ import StylesPreviewColors from "../preview-colors";
7
+ import { useCurrentMergeThemeStyleVariationsWithUserConfig } from "../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property";
8
+ import Subtitle from "../subtitle";
9
+ import Variation from "./variation";
10
+ function ColorVariations({ title, gap = 2 }) {
11
+ const propertiesToFilter = ["color"];
19
12
  const colorVariations = useCurrentMergeThemeStyleVariationsWithUserConfig(propertiesToFilter);
20
-
21
- // Return null if there is only one variation (the default).
22
13
  if (colorVariations?.length <= 1) {
23
14
  return null;
24
15
  }
25
- return /*#__PURE__*/_jsxs(VStack, {
26
- spacing: 3,
27
- children: [title && /*#__PURE__*/_jsx(Subtitle, {
28
- level: 3,
29
- children: title
30
- }), /*#__PURE__*/_jsx(Grid, {
31
- spacing: gap,
32
- children: colorVariations.map((variation, index) => /*#__PURE__*/_jsx(Variation, {
33
- variation: variation,
16
+ return /* @__PURE__ */ jsxs(VStack, { spacing: 3, children: [
17
+ title && /* @__PURE__ */ jsx(Subtitle, { level: 3, children: title }),
18
+ /* @__PURE__ */ jsx(Grid, { spacing: gap, children: colorVariations.map((variation, index) => /* @__PURE__ */ jsx(
19
+ Variation,
20
+ {
21
+ variation,
34
22
  isPill: true,
35
23
  properties: propertiesToFilter,
36
24
  showTooltip: true,
37
- children: () => /*#__PURE__*/_jsx(StylesPreviewColors, {})
38
- }, index))
39
- })]
40
- });
25
+ children: () => /* @__PURE__ */ jsx(StylesPreviewColors, {})
26
+ },
27
+ index
28
+ )) })
29
+ ] });
41
30
  }
42
- //# sourceMappingURL=variations-color.js.map
31
+ export {
32
+ ColorVariations as default
33
+ };
34
+ //# sourceMappingURL=variations-color.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["__experimentalGrid","Grid","__experimentalVStack","VStack","StylesPreviewColors","useCurrentMergeThemeStyleVariationsWithUserConfig","Subtitle","Variation","jsx","_jsx","jsxs","_jsxs","ColorVariations","title","gap","propertiesToFilter","colorVariations","length","spacing","children","level","map","variation","index","isPill","properties","showTooltip"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-color.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport StylesPreviewColors from '../preview-colors';\nimport { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';\nimport Subtitle from '../subtitle';\nimport Variation from './variation';\n\nexport default function ColorVariations( { title, gap = 2 } ) {\n\tconst propertiesToFilter = [ 'color' ];\n\tconst colorVariations =\n\t\tuseCurrentMergeThemeStyleVariationsWithUserConfig( propertiesToFilter );\n\n\t// Return null if there is only one variation (the default).\n\tif ( colorVariations?.length <= 1 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }\n\t\t\t<Grid spacing={ gap }>\n\t\t\t\t{ colorVariations.map( ( variation, index ) => (\n\t\t\t\t\t<Variation\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\tisPill\n\t\t\t\t\t\tproperties={ propertiesToFilter }\n\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t>\n\t\t\t\t\t\t{ () => <StylesPreviewColors /> }\n\t\t\t\t\t</Variation>\n\t\t\t\t) ) }\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,kBAAkB,IAAIC,IAAI,EAC1BC,oBAAoB,IAAIC,MAAM,QACxB,uBAAuB;;AAE9B;AACA;AACA;AACA,OAAOC,mBAAmB,MAAM,mBAAmB;AACnD,SAASC,iDAAiD,QAAQ,kFAAkF;AACpJ,OAAOC,QAAQ,MAAM,aAAa;AAClC,OAAOC,SAAS,MAAM,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEpC,eAAe,SAASC,eAAeA,CAAE;EAAEC,KAAK;EAAEC,GAAG,GAAG;AAAE,CAAC,EAAG;EAC7D,MAAMC,kBAAkB,GAAG,CAAE,OAAO,CAAE;EACtC,MAAMC,eAAe,GACpBX,iDAAiD,CAAEU,kBAAmB,CAAC;;EAExE;EACA,IAAKC,eAAe,EAAEC,MAAM,IAAI,CAAC,EAAG;IACnC,OAAO,IAAI;EACZ;EAEA,oBACCN,KAAA,CAACR,MAAM;IAACe,OAAO,EAAG,CAAG;IAAAC,QAAA,GAClBN,KAAK,iBAAIJ,IAAA,CAACH,QAAQ;MAACc,KAAK,EAAG,CAAG;MAAAD,QAAA,EAAGN;IAAK,CAAY,CAAC,eACrDJ,IAAA,CAACR,IAAI;MAACiB,OAAO,EAAGJ,GAAK;MAAAK,QAAA,EAClBH,eAAe,CAACK,GAAG,CAAE,CAAEC,SAAS,EAAEC,KAAK,kBACxCd,IAAA,CAACF,SAAS;QAETe,SAAS,EAAGA,SAAW;QACvBE,MAAM;QACNC,UAAU,EAAGV,kBAAoB;QACjCW,WAAW;QAAAP,QAAA,EAETA,CAAA,kBAAMV,IAAA,CAACL,mBAAmB,IAAE;MAAC,GANzBmB,KAOI,CACV;IAAC,CACE,CAAC;EAAA,CACA,CAAC;AAEX","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/components/global-styles/variations/variations-color.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport StylesPreviewColors from '../preview-colors';\nimport { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';\nimport Subtitle from '../subtitle';\nimport Variation from './variation';\n\nexport default function ColorVariations( { title, gap = 2 } ) {\n\tconst propertiesToFilter = [ 'color' ];\n\tconst colorVariations =\n\t\tuseCurrentMergeThemeStyleVariationsWithUserConfig( propertiesToFilter );\n\n\t// Return null if there is only one variation (the default).\n\tif ( colorVariations?.length <= 1 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }\n\t\t\t<Grid spacing={ gap }>\n\t\t\t\t{ colorVariations.map( ( variation, index ) => (\n\t\t\t\t\t<Variation\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\tisPill\n\t\t\t\t\t\tproperties={ propertiesToFilter }\n\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t>\n\t\t\t\t\t\t{ () => <StylesPreviewColors /> }\n\t\t\t\t\t</Variation>\n\t\t\t\t) ) }\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n"],
5
+ "mappings": "AA2BE,SACY,KADZ;AAxBF;AAAA,EACC,sBAAsB;AAAA,EACtB,wBAAwB;AAAA,OAClB;AAKP,OAAO,yBAAyB;AAChC,SAAS,yDAAyD;AAClE,OAAO,cAAc;AACrB,OAAO,eAAe;AAEP,SAAR,gBAAkC,EAAE,OAAO,MAAM,EAAE,GAAI;AAC7D,QAAM,qBAAqB,CAAE,OAAQ;AACrC,QAAM,kBACL,kDAAmD,kBAAmB;AAGvE,MAAK,iBAAiB,UAAU,GAAI;AACnC,WAAO;AAAA,EACR;AAEA,SACC,qBAAC,UAAO,SAAU,GACf;AAAA,aAAS,oBAAC,YAAS,OAAQ,GAAM,iBAAO;AAAA,IAC1C,oBAAC,QAAK,SAAU,KACb,0BAAgB,IAAK,CAAE,WAAW,UACnC;AAAA,MAAC;AAAA;AAAA,QAEA;AAAA,QACA,QAAM;AAAA,QACN,YAAa;AAAA,QACb,aAAW;AAAA,QAET,gBAAM,oBAAC,uBAAoB;AAAA;AAAA,MANvB;AAAA,IAOP,CACC,GACH;AAAA,KACD;AAEF;",
6
+ "names": []
7
+ }
@@ -1,53 +1,46 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { store as blocksStore } from '@wordpress/blocks';
5
- import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
6
- import { useSelect } from '@wordpress/data';
7
- import { __experimentalItemGroup as ItemGroup } from '@wordpress/components';
8
-
9
- /**
10
- * Internal dependencies
11
- */
12
- import { NavigationButtonAsItem } from '../navigation-button';
13
- import { unlock } from '../../../lock-unlock';
14
- import { jsx as _jsx } from "react/jsx-runtime";
15
- const {
16
- useGlobalStyle
17
- } = unlock(blockEditorPrivateApis);
18
-
19
- // Only core block styles (source === block) or block styles with a matching
20
- // theme.json style variation will be configurable via Global Styles.
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { store as blocksStore } from "@wordpress/blocks";
3
+ import { privateApis as blockEditorPrivateApis } from "@wordpress/block-editor";
4
+ import { useSelect } from "@wordpress/data";
5
+ import { __experimentalItemGroup as ItemGroup } from "@wordpress/components";
6
+ import { NavigationButtonAsItem } from "../navigation-button";
7
+ import { unlock } from "../../../lock-unlock";
8
+ const { useGlobalStyle } = unlock(blockEditorPrivateApis);
21
9
  function getFilteredBlockStyles(blockStyles, variations) {
22
- return blockStyles?.filter(style => style.source === 'block' || variations.includes(style.name));
10
+ return blockStyles?.filter(
11
+ (style) => style.source === "block" || variations.includes(style.name)
12
+ );
23
13
  }
24
- export function useBlockVariations(name) {
25
- const blockStyles = useSelect(select => {
26
- const {
27
- getBlockStyles
28
- } = select(blocksStore);
29
- return getBlockStyles(name);
30
- }, [name]);
31
- const [variations] = useGlobalStyle('variations', name);
32
- const variationNames = Object.keys(variations !== null && variations !== void 0 ? variations : {});
14
+ function useBlockVariations(name) {
15
+ const blockStyles = useSelect(
16
+ (select) => {
17
+ const { getBlockStyles } = select(blocksStore);
18
+ return getBlockStyles(name);
19
+ },
20
+ [name]
21
+ );
22
+ const [variations] = useGlobalStyle("variations", name);
23
+ const variationNames = Object.keys(variations ?? {});
33
24
  return getFilteredBlockStyles(blockStyles, variationNames);
34
25
  }
35
- export function VariationsPanel({
36
- name
37
- }) {
26
+ function VariationsPanel({ name }) {
38
27
  const coreBlockStyles = useBlockVariations(name);
39
- return /*#__PURE__*/_jsx(ItemGroup, {
40
- isBordered: true,
41
- isSeparated: true,
42
- children: coreBlockStyles.map((style, index) => {
43
- if (style?.isDefault) {
44
- return null;
45
- }
46
- return /*#__PURE__*/_jsx(NavigationButtonAsItem, {
47
- path: '/blocks/' + encodeURIComponent(name) + '/variations/' + encodeURIComponent(style.name),
28
+ return /* @__PURE__ */ jsx(ItemGroup, { isBordered: true, isSeparated: true, children: coreBlockStyles.map((style, index) => {
29
+ if (style?.isDefault) {
30
+ return null;
31
+ }
32
+ return /* @__PURE__ */ jsx(
33
+ NavigationButtonAsItem,
34
+ {
35
+ path: "/blocks/" + encodeURIComponent(name) + "/variations/" + encodeURIComponent(style.name),
48
36
  children: style.label
49
- }, index);
50
- })
51
- });
37
+ },
38
+ index
39
+ );
40
+ }) });
52
41
  }
53
- //# sourceMappingURL=variations-panel.js.map
42
+ export {
43
+ VariationsPanel,
44
+ useBlockVariations
45
+ };
46
+ //# sourceMappingURL=variations-panel.js.map