@wordpress/global-styles-ui 1.1.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 (701) hide show
  1. package/LICENSE.md +788 -0
  2. package/README.md +48 -0
  3. package/build/background-panel.js +62 -0
  4. package/build/background-panel.js.map +7 -0
  5. package/build/block-preview-panel.js +90 -0
  6. package/build/block-preview-panel.js.map +7 -0
  7. package/build/color-indicator-wrapper.js +55 -0
  8. package/build/color-indicator-wrapper.js.map +7 -0
  9. package/build/color-palette-panel.js +123 -0
  10. package/build/color-palette-panel.js.map +7 -0
  11. package/build/color-preview.js +94 -0
  12. package/build/color-preview.js.map +7 -0
  13. package/build/color-variations.js +41 -0
  14. package/build/color-variations.js.map +7 -0
  15. package/build/confirm-reset-shadow-dialog.js +55 -0
  16. package/build/confirm-reset-shadow-dialog.js.map +7 -0
  17. package/build/context.js +37 -0
  18. package/build/context.js.map +7 -0
  19. package/build/dimensions-panel.js +89 -0
  20. package/build/dimensions-panel.js.map +7 -0
  21. package/build/font-families.js +114 -0
  22. package/build/font-families.js.map +7 -0
  23. package/build/font-family-item.js +48 -0
  24. package/build/font-family-item.js.map +7 -0
  25. package/build/font-library-modal/collection-font-variant.js +75 -0
  26. package/build/font-library-modal/collection-font-variant.js.map +7 -0
  27. package/build/font-library-modal/context.js +386 -0
  28. package/build/font-library-modal/context.js.map +7 -0
  29. package/build/font-library-modal/font-card.js +81 -0
  30. package/build/font-library-modal/font-card.js.map +7 -0
  31. package/build/font-library-modal/font-collection.js +510 -0
  32. package/build/font-library-modal/font-collection.js.map +7 -0
  33. package/build/font-library-modal/font-demo.js +111 -0
  34. package/build/font-library-modal/font-demo.js.map +7 -0
  35. package/build/font-library-modal/google-fonts-confirm-dialog.js +58 -0
  36. package/build/font-library-modal/google-fonts-confirm-dialog.js.map +7 -0
  37. package/build/font-library-modal/index.js +110 -0
  38. package/build/font-library-modal/index.js.map +7 -0
  39. package/build/font-library-modal/installed-fonts.js +453 -0
  40. package/build/font-library-modal/installed-fonts.js.map +7 -0
  41. package/build/font-library-modal/lib/inflate.js +2628 -0
  42. package/build/font-library-modal/lib/inflate.js.map +7 -0
  43. package/build/font-library-modal/lib/lib-font.browser.d.js +33 -0
  44. package/build/font-library-modal/lib/lib-font.browser.d.js.map +7 -0
  45. package/build/font-library-modal/lib/lib-font.browser.js +3788 -0
  46. package/build/font-library-modal/lib/lib-font.browser.js.map +7 -0
  47. package/build/font-library-modal/lib/unbrotli.js +3678 -0
  48. package/build/font-library-modal/lib/unbrotli.js.map +7 -0
  49. package/build/font-library-modal/library-font-details.js +63 -0
  50. package/build/font-library-modal/library-font-details.js.map +7 -0
  51. package/build/font-library-modal/library-font-variant.js +81 -0
  52. package/build/font-library-modal/library-font-variant.js.map +7 -0
  53. package/build/font-library-modal/resolvers.js +115 -0
  54. package/build/font-library-modal/resolvers.js.map +7 -0
  55. package/build/font-library-modal/types.js +17 -0
  56. package/build/font-library-modal/types.js.map +7 -0
  57. package/build/font-library-modal/upload-fonts.js +207 -0
  58. package/build/font-library-modal/upload-fonts.js.map +7 -0
  59. package/build/font-library-modal/utils/constants.js +49 -0
  60. package/build/font-library-modal/utils/constants.js.map +7 -0
  61. package/build/font-library-modal/utils/filter-fonts.js +39 -0
  62. package/build/font-library-modal/utils/filter-fonts.js.map +7 -0
  63. package/build/font-library-modal/utils/fonts-outline.js +51 -0
  64. package/build/font-library-modal/utils/fonts-outline.js.map +7 -0
  65. package/build/font-library-modal/utils/index.js +274 -0
  66. package/build/font-library-modal/utils/index.js.map +7 -0
  67. package/build/font-library-modal/utils/make-families-from-faces.js +45 -0
  68. package/build/font-library-modal/utils/make-families-from-faces.js.map +7 -0
  69. package/build/font-library-modal/utils/preview-styles.js +119 -0
  70. package/build/font-library-modal/utils/preview-styles.js.map +7 -0
  71. package/build/font-library-modal/utils/set-immutably.js +40 -0
  72. package/build/font-library-modal/utils/set-immutably.js.map +7 -0
  73. package/build/font-library-modal/utils/sort-font-faces.js +59 -0
  74. package/build/font-library-modal/utils/sort-font-faces.js.map +7 -0
  75. package/build/font-library-modal/utils/toggleFont.js +67 -0
  76. package/build/font-library-modal/utils/toggleFont.js.map +7 -0
  77. package/build/font-sizes/confirm-delete-font-size-dialog.js +60 -0
  78. package/build/font-sizes/confirm-delete-font-size-dialog.js.map +7 -0
  79. package/build/font-sizes/confirm-reset-font-sizes-dialog.js +55 -0
  80. package/build/font-sizes/confirm-reset-font-sizes-dialog.js.map +7 -0
  81. package/build/font-sizes/font-size-preview.js +50 -0
  82. package/build/font-sizes/font-size-preview.js.map +7 -0
  83. package/build/font-sizes/font-size.js +261 -0
  84. package/build/font-sizes/font-size.js.map +7 -0
  85. package/build/font-sizes/font-sizes-count.js +40 -0
  86. package/build/font-sizes/font-sizes-count.js.map +7 -0
  87. package/build/font-sizes/font-sizes.js +215 -0
  88. package/build/font-sizes/font-sizes.js.map +7 -0
  89. package/build/font-sizes/rename-font-size-dialog.js +96 -0
  90. package/build/font-sizes/rename-font-size-dialog.js.map +7 -0
  91. package/build/global-styles-ui.js +213 -0
  92. package/build/global-styles-ui.js.map +7 -0
  93. package/build/gradients-palette-panel.js +133 -0
  94. package/build/gradients-palette-panel.js.map +7 -0
  95. package/build/highlighted-colors.js +57 -0
  96. package/build/highlighted-colors.js.map +7 -0
  97. package/build/hooks.js +176 -0
  98. package/build/hooks.js.map +7 -0
  99. package/build/icon-with-current-color.js +56 -0
  100. package/build/icon-with-current-color.js.map +7 -0
  101. package/build/index.js +51 -0
  102. package/build/index.js.map +7 -0
  103. package/build/lock-unlock.js +35 -0
  104. package/build/lock-unlock.js.map +7 -0
  105. package/build/navigation-button.js +52 -0
  106. package/build/navigation-button.js.map +7 -0
  107. package/build/pagination/index.js +133 -0
  108. package/build/pagination/index.js.map +7 -0
  109. package/build/palette.js +93 -0
  110. package/build/palette.js.map +7 -0
  111. package/build/preset-colors.js +40 -0
  112. package/build/preset-colors.js.map +7 -0
  113. package/build/preview-colors.js +86 -0
  114. package/build/preview-colors.js.map +7 -0
  115. package/build/preview-hooks.js +60 -0
  116. package/build/preview-hooks.js.map +7 -0
  117. package/build/preview-styles.js +219 -0
  118. package/build/preview-styles.js.map +7 -0
  119. package/build/preview-typography.js +72 -0
  120. package/build/preview-typography.js.map +7 -0
  121. package/build/preview-wrapper.js +102 -0
  122. package/build/preview-wrapper.js.map +7 -0
  123. package/build/provider.js +54 -0
  124. package/build/provider.js.map +7 -0
  125. package/build/root-menu.js +72 -0
  126. package/build/root-menu.js.map +7 -0
  127. package/build/screen-background.js +58 -0
  128. package/build/screen-background.js.map +7 -0
  129. package/build/screen-block-list.js +160 -0
  130. package/build/screen-block-list.js.map +7 -0
  131. package/build/screen-block.js +316 -0
  132. package/build/screen-block.js.map +7 -0
  133. package/build/screen-color-palette.js +64 -0
  134. package/build/screen-color-palette.js.map +7 -0
  135. package/build/screen-colors.js +85 -0
  136. package/build/screen-colors.js.map +7 -0
  137. package/build/screen-css.js +68 -0
  138. package/build/screen-css.js.map +7 -0
  139. package/build/screen-header.js +61 -0
  140. package/build/screen-header.js.map +7 -0
  141. package/build/screen-layout.js +54 -0
  142. package/build/screen-layout.js.map +7 -0
  143. package/build/screen-revisions/index.js +147 -0
  144. package/build/screen-revisions/index.js.map +7 -0
  145. package/build/screen-revisions/revisions-buttons.js +198 -0
  146. package/build/screen-revisions/revisions-buttons.js.map +7 -0
  147. package/build/screen-revisions/types.js +17 -0
  148. package/build/screen-revisions/types.js.map +7 -0
  149. package/build/screen-revisions/use-global-styles-revisions.js +163 -0
  150. package/build/screen-revisions/use-global-styles-revisions.js.map +7 -0
  151. package/build/screen-root.js +134 -0
  152. package/build/screen-root.js.map +7 -0
  153. package/build/screen-shadows.js +49 -0
  154. package/build/screen-shadows.js.map +7 -0
  155. package/build/screen-style-variations.js +52 -0
  156. package/build/screen-style-variations.js.map +7 -0
  157. package/build/screen-typography-element.js +167 -0
  158. package/build/screen-typography-element.js.map +7 -0
  159. package/build/screen-typography.js +65 -0
  160. package/build/screen-typography.js.map +7 -0
  161. package/build/shadow-utils.js +125 -0
  162. package/build/shadow-utils.js.map +7 -0
  163. package/build/shadows-edit-panel.js +503 -0
  164. package/build/shadows-edit-panel.js.map +7 -0
  165. package/build/shadows-panel.js +203 -0
  166. package/build/shadows-panel.js.map +7 -0
  167. package/build/size-control/index.js +86 -0
  168. package/build/size-control/index.js.map +7 -0
  169. package/build/style-variations-container.js +130 -0
  170. package/build/style-variations-container.js.map +7 -0
  171. package/build/style-variations-content.js +52 -0
  172. package/build/style-variations-content.js.map +7 -0
  173. package/build/style-variations.js +41 -0
  174. package/build/style-variations.js.map +7 -0
  175. package/build/subtitle.js +33 -0
  176. package/build/subtitle.js.map +7 -0
  177. package/build/typography-elements.js +117 -0
  178. package/build/typography-elements.js.map +7 -0
  179. package/build/typography-example.js +79 -0
  180. package/build/typography-example.js.map +7 -0
  181. package/build/typography-panel.js +64 -0
  182. package/build/typography-panel.js.map +7 -0
  183. package/build/typography-preview.js +70 -0
  184. package/build/typography-preview.js.map +7 -0
  185. package/build/typography-variations.js +41 -0
  186. package/build/typography-variations.js.map +7 -0
  187. package/build/utils.js +210 -0
  188. package/build/utils.js.map +7 -0
  189. package/build/variations/variation.js +116 -0
  190. package/build/variations/variation.js.map +7 -0
  191. package/build/variations/variations-color.js +64 -0
  192. package/build/variations/variations-color.js.map +7 -0
  193. package/build/variations/variations-panel.js +69 -0
  194. package/build/variations/variations-panel.js.map +7 -0
  195. package/build/variations/variations-typography.js +80 -0
  196. package/build/variations/variations-typography.js.map +7 -0
  197. package/build/with-global-styles-provider.js +48 -0
  198. package/build/with-global-styles-provider.js.map +7 -0
  199. package/build-module/background-panel.js +38 -0
  200. package/build-module/background-panel.js.map +7 -0
  201. package/build-module/block-preview-panel.js +70 -0
  202. package/build-module/block-preview-panel.js.map +7 -0
  203. package/build-module/color-indicator-wrapper.js +25 -0
  204. package/build-module/color-indicator-wrapper.js.map +7 -0
  205. package/build-module/color-palette-panel.js +97 -0
  206. package/build-module/color-palette-panel.js.map +7 -0
  207. package/build-module/color-preview.js +70 -0
  208. package/build-module/color-preview.js.map +7 -0
  209. package/build-module/color-variations.js +7 -0
  210. package/build-module/color-variations.js.map +7 -0
  211. package/build-module/confirm-reset-shadow-dialog.js +35 -0
  212. package/build-module/confirm-reset-shadow-dialog.js.map +7 -0
  213. package/build-module/context.js +13 -0
  214. package/build-module/context.js.map +7 -0
  215. package/build-module/dimensions-panel.js +69 -0
  216. package/build-module/dimensions-panel.js.map +7 -0
  217. package/build-module/font-families.js +92 -0
  218. package/build-module/font-families.js.map +7 -0
  219. package/build-module/font-family-item.js +32 -0
  220. package/build-module/font-family-item.js.map +7 -0
  221. package/build-module/font-library-modal/collection-font-variant.js +45 -0
  222. package/build-module/font-library-modal/collection-font-variant.js.map +7 -0
  223. package/build-module/font-library-modal/context.js +382 -0
  224. package/build-module/font-library-modal/context.js.map +7 -0
  225. package/build-module/font-library-modal/font-card.js +57 -0
  226. package/build-module/font-library-modal/font-card.js.map +7 -0
  227. package/build-module/font-library-modal/font-collection.js +510 -0
  228. package/build-module/font-library-modal/font-collection.js.map +7 -0
  229. package/build-module/font-library-modal/font-demo.js +94 -0
  230. package/build-module/font-library-modal/font-demo.js.map +7 -0
  231. package/build-module/font-library-modal/google-fonts-confirm-dialog.js +45 -0
  232. package/build-module/font-library-modal/google-fonts-confirm-dialog.js.map +7 -0
  233. package/build-module/font-library-modal/index.js +83 -0
  234. package/build-module/font-library-modal/index.js.map +7 -0
  235. package/build-module/font-library-modal/installed-fonts.js +442 -0
  236. package/build-module/font-library-modal/installed-fonts.js.map +7 -0
  237. package/build-module/font-library-modal/lib/inflate.js +2636 -0
  238. package/build-module/font-library-modal/lib/inflate.js.map +7 -0
  239. package/build-module/font-library-modal/lib/lib-font.browser.d.js +9 -0
  240. package/build-module/font-library-modal/lib/lib-font.browser.d.js.map +7 -0
  241. package/build-module/font-library-modal/lib/lib-font.browser.js +3754 -0
  242. package/build-module/font-library-modal/lib/lib-font.browser.js.map +7 -0
  243. package/build-module/font-library-modal/lib/unbrotli.js +3686 -0
  244. package/build-module/font-library-modal/lib/unbrotli.js.map +7 -0
  245. package/build-module/font-library-modal/library-font-details.js +36 -0
  246. package/build-module/font-library-modal/library-font-details.js.map +7 -0
  247. package/build-module/font-library-modal/library-font-variant.js +51 -0
  248. package/build-module/font-library-modal/library-font-variant.js.map +7 -0
  249. package/build-module/font-library-modal/resolvers.js +76 -0
  250. package/build-module/font-library-modal/resolvers.js.map +7 -0
  251. package/build-module/font-library-modal/types.js +1 -0
  252. package/build-module/font-library-modal/types.js.map +7 -0
  253. package/build-module/font-library-modal/upload-fonts.js +187 -0
  254. package/build-module/font-library-modal/upload-fonts.js.map +7 -0
  255. package/build-module/font-library-modal/utils/constants.js +23 -0
  256. package/build-module/font-library-modal/utils/constants.js.map +7 -0
  257. package/build-module/font-library-modal/utils/filter-fonts.js +19 -0
  258. package/build-module/font-library-modal/utils/filter-fonts.js.map +7 -0
  259. package/build-module/font-library-modal/utils/fonts-outline.js +26 -0
  260. package/build-module/font-library-modal/utils/fonts-outline.js.map +7 -0
  261. package/build-module/font-library-modal/utils/index.js +238 -0
  262. package/build-module/font-library-modal/utils/index.js.map +7 -0
  263. package/build-module/font-library-modal/utils/make-families-from-faces.js +25 -0
  264. package/build-module/font-library-modal/utils/make-families-from-faces.js.map +7 -0
  265. package/build-module/font-library-modal/utils/preview-styles.js +92 -0
  266. package/build-module/font-library-modal/utils/preview-styles.js.map +7 -0
  267. package/build-module/font-library-modal/utils/set-immutably.js +16 -0
  268. package/build-module/font-library-modal/utils/set-immutably.js.map +7 -0
  269. package/build-module/font-library-modal/utils/sort-font-faces.js +35 -0
  270. package/build-module/font-library-modal/utils/sort-font-faces.js.map +7 -0
  271. package/build-module/font-library-modal/utils/toggleFont.js +43 -0
  272. package/build-module/font-library-modal/utils/toggleFont.js.map +7 -0
  273. package/build-module/font-sizes/confirm-delete-font-size-dialog.js +40 -0
  274. package/build-module/font-sizes/confirm-delete-font-size-dialog.js.map +7 -0
  275. package/build-module/font-sizes/confirm-reset-font-sizes-dialog.js +35 -0
  276. package/build-module/font-sizes/confirm-reset-font-sizes-dialog.js.map +7 -0
  277. package/build-module/font-sizes/font-size-preview.js +30 -0
  278. package/build-module/font-sizes/font-size-preview.js.map +7 -0
  279. package/build-module/font-sizes/font-size.js +241 -0
  280. package/build-module/font-sizes/font-size.js.map +7 -0
  281. package/build-module/font-sizes/font-sizes-count.js +25 -0
  282. package/build-module/font-sizes/font-sizes-count.js.map +7 -0
  283. package/build-module/font-sizes/font-sizes.js +200 -0
  284. package/build-module/font-sizes/font-sizes.js.map +7 -0
  285. package/build-module/font-sizes/rename-font-size-dialog.js +82 -0
  286. package/build-module/font-sizes/rename-font-size-dialog.js.map +7 -0
  287. package/build-module/global-styles-ui.js +182 -0
  288. package/build-module/global-styles-ui.js.map +7 -0
  289. package/build-module/gradients-palette-panel.js +118 -0
  290. package/build-module/gradients-palette-panel.js.map +7 -0
  291. package/build-module/highlighted-colors.js +37 -0
  292. package/build-module/highlighted-colors.js.map +7 -0
  293. package/build-module/hooks.js +144 -0
  294. package/build-module/hooks.js.map +7 -0
  295. package/build-module/icon-with-current-color.js +22 -0
  296. package/build-module/icon-with-current-color.js.map +7 -0
  297. package/build-module/index.js +13 -0
  298. package/build-module/index.js.map +7 -0
  299. package/build-module/lock-unlock.js +10 -0
  300. package/build-module/lock-unlock.js.map +7 -0
  301. package/build-module/navigation-button.js +32 -0
  302. package/build-module/navigation-button.js.map +7 -0
  303. package/build-module/pagination/index.js +107 -0
  304. package/build-module/pagination/index.js.map +7 -0
  305. package/build-module/palette.js +70 -0
  306. package/build-module/palette.js.map +7 -0
  307. package/build-module/preset-colors.js +20 -0
  308. package/build-module/preset-colors.js.map +7 -0
  309. package/build-module/preview-colors.js +59 -0
  310. package/build-module/preview-colors.js.map +7 -0
  311. package/build-module/preview-hooks.js +36 -0
  312. package/build-module/preview-hooks.js.map +7 -0
  313. package/build-module/preview-styles.js +193 -0
  314. package/build-module/preview-styles.js.map +7 -0
  315. package/build-module/preview-typography.js +42 -0
  316. package/build-module/preview-typography.js.map +7 -0
  317. package/build-module/preview-wrapper.js +86 -0
  318. package/build-module/preview-wrapper.js.map +7 -0
  319. package/build-module/provider.js +30 -0
  320. package/build-module/provider.js.map +7 -0
  321. package/build-module/root-menu.js +58 -0
  322. package/build-module/root-menu.js.map +7 -0
  323. package/build-module/screen-background.js +28 -0
  324. package/build-module/screen-background.js.map +7 -0
  325. package/build-module/screen-block-list.js +150 -0
  326. package/build-module/screen-block-list.js.map +7 -0
  327. package/build-module/screen-block.js +293 -0
  328. package/build-module/screen-block.js.map +7 -0
  329. package/build-module/screen-color-palette.js +34 -0
  330. package/build-module/screen-color-palette.js.map +7 -0
  331. package/build-module/screen-colors.js +55 -0
  332. package/build-module/screen-colors.js.map +7 -0
  333. package/build-module/screen-css.js +48 -0
  334. package/build-module/screen-css.js.map +7 -0
  335. package/build-module/screen-header.js +44 -0
  336. package/build-module/screen-header.js.map +7 -0
  337. package/build-module/screen-layout.js +24 -0
  338. package/build-module/screen-layout.js.map +7 -0
  339. package/build-module/screen-revisions/index.js +121 -0
  340. package/build-module/screen-revisions/index.js.map +7 -0
  341. package/build-module/screen-revisions/revisions-buttons.js +178 -0
  342. package/build-module/screen-revisions/revisions-buttons.js.map +7 -0
  343. package/build-module/screen-revisions/types.js +1 -0
  344. package/build-module/screen-revisions/types.js.map +7 -0
  345. package/build-module/screen-revisions/use-global-styles-revisions.js +145 -0
  346. package/build-module/screen-revisions/use-global-styles-revisions.js.map +7 -0
  347. package/build-module/screen-root.js +114 -0
  348. package/build-module/screen-root.js.map +7 -0
  349. package/build-module/screen-shadows.js +14 -0
  350. package/build-module/screen-shadows.js.map +7 -0
  351. package/build-module/screen-style-variations.js +32 -0
  352. package/build-module/screen-style-variations.js.map +7 -0
  353. package/build-module/screen-typography-element.js +141 -0
  354. package/build-module/screen-typography-element.js.map +7 -0
  355. package/build-module/screen-typography.js +35 -0
  356. package/build-module/screen-typography.js.map +7 -0
  357. package/build-module/shadow-utils.js +98 -0
  358. package/build-module/shadow-utils.js.map +7 -0
  359. package/build-module/shadows-edit-panel.js +502 -0
  360. package/build-module/shadows-edit-panel.js.map +7 -0
  361. package/build-module/shadows-panel.js +182 -0
  362. package/build-module/shadows-panel.js.map +7 -0
  363. package/build-module/size-control/index.js +72 -0
  364. package/build-module/size-control/index.js.map +7 -0
  365. package/build-module/style-variations-container.js +100 -0
  366. package/build-module/style-variations-container.js.map +7 -0
  367. package/build-module/style-variations-content.js +18 -0
  368. package/build-module/style-variations-content.js.map +7 -0
  369. package/build-module/style-variations.js +7 -0
  370. package/build-module/style-variations.js.map +7 -0
  371. package/build-module/subtitle.js +9 -0
  372. package/build-module/subtitle.js.map +7 -0
  373. package/build-module/typography-elements.js +102 -0
  374. package/build-module/typography-elements.js.map +7 -0
  375. package/build-module/typography-example.js +59 -0
  376. package/build-module/typography-example.js.map +7 -0
  377. package/build-module/typography-panel.js +44 -0
  378. package/build-module/typography-panel.js.map +7 -0
  379. package/build-module/typography-preview.js +50 -0
  380. package/build-module/typography-preview.js.map +7 -0
  381. package/build-module/typography-variations.js +7 -0
  382. package/build-module/typography-variations.js.map +7 -0
  383. package/build-module/utils.js +179 -0
  384. package/build-module/utils.js.map +7 -0
  385. package/build-module/variations/variation.js +86 -0
  386. package/build-module/variations/variation.js.map +7 -0
  387. package/build-module/variations/variations-color.js +37 -0
  388. package/build-module/variations/variations-color.js.map +7 -0
  389. package/build-module/variations/variations-panel.js +44 -0
  390. package/build-module/variations/variations-panel.js.map +7 -0
  391. package/build-module/variations/variations-typography.js +53 -0
  392. package/build-module/variations/variations-typography.js.map +7 -0
  393. package/build-module/with-global-styles-provider.js +24 -0
  394. package/build-module/with-global-styles-provider.js.map +7 -0
  395. package/build-style/style-rtl.css +717 -0
  396. package/build-style/style.css +718 -0
  397. package/build-types/background-panel.d.ts +10 -0
  398. package/build-types/background-panel.d.ts.map +1 -0
  399. package/build-types/block-preview-panel.d.ts +7 -0
  400. package/build-types/block-preview-panel.d.ts.map +1 -0
  401. package/build-types/color-indicator-wrapper.d.ts +7 -0
  402. package/build-types/color-indicator-wrapper.d.ts.map +1 -0
  403. package/build-types/color-palette-panel.d.ts +6 -0
  404. package/build-types/color-palette-panel.d.ts.map +1 -0
  405. package/build-types/color-preview.d.ts +2 -0
  406. package/build-types/color-preview.d.ts.map +1 -0
  407. package/build-types/color-variations.d.ts +27 -0
  408. package/build-types/color-variations.d.ts.map +1 -0
  409. package/build-types/confirm-reset-shadow-dialog.d.ts +10 -0
  410. package/build-types/confirm-reset-shadow-dialog.d.ts.map +1 -0
  411. package/build-types/context.d.ts +10 -0
  412. package/build-types/context.d.ts.map +1 -0
  413. package/build-types/dimensions-panel.d.ts +2 -0
  414. package/build-types/dimensions-panel.d.ts.map +1 -0
  415. package/build-types/font-families.d.ts +4 -0
  416. package/build-types/font-families.d.ts.map +1 -0
  417. package/build-types/font-family-item.d.ts +7 -0
  418. package/build-types/font-family-item.d.ts.map +1 -0
  419. package/build-types/font-library-modal/collection-font-variant.d.ts +4 -0
  420. package/build-types/font-library-modal/collection-font-variant.d.ts.map +1 -0
  421. package/build-types/font-library-modal/context.d.ts +7 -0
  422. package/build-types/font-library-modal/context.d.ts.map +1 -0
  423. package/build-types/font-library-modal/font-card.d.ts +9 -0
  424. package/build-types/font-library-modal/font-card.d.ts.map +1 -0
  425. package/build-types/font-library-modal/font-collection.d.ts +5 -0
  426. package/build-types/font-library-modal/font-collection.d.ts.map +1 -0
  427. package/build-types/font-library-modal/font-demo.d.ts +4 -0
  428. package/build-types/font-library-modal/font-demo.d.ts.map +1 -0
  429. package/build-types/font-library-modal/google-fonts-confirm-dialog.d.ts +3 -0
  430. package/build-types/font-library-modal/google-fonts-confirm-dialog.d.ts.map +1 -0
  431. package/build-types/font-library-modal/index.d.ts +6 -0
  432. package/build-types/font-library-modal/index.d.ts.map +1 -0
  433. package/build-types/font-library-modal/installed-fonts.d.ts +3 -0
  434. package/build-types/font-library-modal/installed-fonts.d.ts.map +1 -0
  435. package/build-types/font-library-modal/library-font-details.d.ts +6 -0
  436. package/build-types/font-library-modal/library-font-details.d.ts.map +1 -0
  437. package/build-types/font-library-modal/library-font-variant.d.ts +7 -0
  438. package/build-types/font-library-modal/library-font-variant.d.ts.map +1 -0
  439. package/build-types/font-library-modal/resolvers.d.ts +43 -0
  440. package/build-types/font-library-modal/resolvers.d.ts.map +1 -0
  441. package/build-types/font-library-modal/types.d.ts +133 -0
  442. package/build-types/font-library-modal/types.d.ts.map +1 -0
  443. package/build-types/font-library-modal/upload-fonts.d.ts +3 -0
  444. package/build-types/font-library-modal/upload-fonts.d.ts.map +1 -0
  445. package/build-types/font-library-modal/utils/constants.d.ts +4 -0
  446. package/build-types/font-library-modal/utils/constants.d.ts.map +1 -0
  447. package/build-types/font-library-modal/utils/filter-fonts.d.ts +25 -0
  448. package/build-types/font-library-modal/utils/filter-fonts.d.ts.map +1 -0
  449. package/build-types/font-library-modal/utils/fonts-outline.d.ts +7 -0
  450. package/build-types/font-library-modal/utils/fonts-outline.d.ts.map +1 -0
  451. package/build-types/font-library-modal/utils/index.d.ts +21 -0
  452. package/build-types/font-library-modal/utils/index.d.ts.map +1 -0
  453. package/build-types/font-library-modal/utils/make-families-from-faces.d.ts +6 -0
  454. package/build-types/font-library-modal/utils/make-families-from-faces.d.ts.map +1 -0
  455. package/build-types/font-library-modal/utils/preview-styles.d.ts +13 -0
  456. package/build-types/font-library-modal/utils/preview-styles.d.ts.map +1 -0
  457. package/build-types/font-library-modal/utils/set-immutably.d.ts +13 -0
  458. package/build-types/font-library-modal/utils/set-immutably.d.ts.map +1 -0
  459. package/build-types/font-library-modal/utils/sort-font-faces.d.ts +6 -0
  460. package/build-types/font-library-modal/utils/sort-font-faces.d.ts.map +1 -0
  461. package/build-types/font-library-modal/utils/toggleFont.d.ts +38 -0
  462. package/build-types/font-library-modal/utils/toggleFont.d.ts.map +1 -0
  463. package/build-types/font-sizes/confirm-delete-font-size-dialog.d.ts +10 -0
  464. package/build-types/font-sizes/confirm-delete-font-size-dialog.d.ts.map +1 -0
  465. package/build-types/font-sizes/confirm-reset-font-sizes-dialog.d.ts +10 -0
  466. package/build-types/font-sizes/confirm-reset-font-sizes-dialog.d.ts.map +1 -0
  467. package/build-types/font-sizes/font-size-preview.d.ts +7 -0
  468. package/build-types/font-sizes/font-size-preview.d.ts.map +1 -0
  469. package/build-types/font-sizes/font-size.d.ts +4 -0
  470. package/build-types/font-sizes/font-size.d.ts.map +1 -0
  471. package/build-types/font-sizes/font-sizes-count.d.ts +3 -0
  472. package/build-types/font-sizes/font-sizes-count.d.ts.map +1 -0
  473. package/build-types/font-sizes/font-sizes.d.ts +3 -0
  474. package/build-types/font-sizes/font-sizes.d.ts.map +1 -0
  475. package/build-types/font-sizes/rename-font-size-dialog.d.ts +9 -0
  476. package/build-types/font-sizes/rename-font-size-dialog.d.ts.map +1 -0
  477. package/build-types/global-styles-ui.d.ts +26 -0
  478. package/build-types/global-styles-ui.d.ts.map +1 -0
  479. package/build-types/gradients-palette-panel.d.ts +6 -0
  480. package/build-types/gradients-palette-panel.d.ts.map +1 -0
  481. package/build-types/highlighted-colors.d.ts +7 -0
  482. package/build-types/highlighted-colors.d.ts.map +1 -0
  483. package/build-types/hooks.d.ts +46 -0
  484. package/build-types/hooks.d.ts.map +1 -0
  485. package/build-types/icon-with-current-color.d.ts +9 -0
  486. package/build-types/icon-with-current-color.d.ts.map +1 -0
  487. package/build-types/index.d.ts +6 -0
  488. package/build-types/index.d.ts.map +1 -0
  489. package/build-types/lock-unlock.d.ts +2 -0
  490. package/build-types/lock-unlock.d.ts.map +1 -0
  491. package/build-types/navigation-button.d.ts +10 -0
  492. package/build-types/navigation-button.d.ts.map +1 -0
  493. package/build-types/pagination/index.d.ts +13 -0
  494. package/build-types/pagination/index.d.ts.map +1 -0
  495. package/build-types/palette.d.ts +6 -0
  496. package/build-types/palette.d.ts.map +1 -0
  497. package/build-types/preset-colors.d.ts +2 -0
  498. package/build-types/preset-colors.d.ts.map +1 -0
  499. package/build-types/preview-colors.d.ts +8 -0
  500. package/build-types/preview-colors.d.ts.map +1 -0
  501. package/build-types/preview-hooks.d.ts +9 -0
  502. package/build-types/preview-hooks.d.ts.map +1 -0
  503. package/build-types/preview-styles.d.ts +9 -0
  504. package/build-types/preview-styles.d.ts.map +1 -0
  505. package/build-types/preview-typography.d.ts +8 -0
  506. package/build-types/preview-typography.d.ts.map +1 -0
  507. package/build-types/preview-wrapper.d.ts +15 -0
  508. package/build-types/preview-wrapper.d.ts.map +1 -0
  509. package/build-types/provider.d.ts +15 -0
  510. package/build-types/provider.d.ts.map +1 -0
  511. package/build-types/root-menu.d.ts +3 -0
  512. package/build-types/root-menu.d.ts.map +1 -0
  513. package/build-types/screen-background.d.ts +3 -0
  514. package/build-types/screen-background.d.ts.map +1 -0
  515. package/build-types/screen-block-list.d.ts +4 -0
  516. package/build-types/screen-block-list.d.ts.map +1 -0
  517. package/build-types/screen-block.d.ts +7 -0
  518. package/build-types/screen-block.d.ts.map +1 -0
  519. package/build-types/screen-color-palette.d.ts +5 -0
  520. package/build-types/screen-color-palette.d.ts.map +1 -0
  521. package/build-types/screen-colors.d.ts +3 -0
  522. package/build-types/screen-colors.d.ts.map +1 -0
  523. package/build-types/screen-css.d.ts +3 -0
  524. package/build-types/screen-css.d.ts.map +1 -0
  525. package/build-types/screen-header.d.ts +8 -0
  526. package/build-types/screen-header.d.ts.map +1 -0
  527. package/build-types/screen-layout.d.ts +3 -0
  528. package/build-types/screen-layout.d.ts.map +1 -0
  529. package/build-types/screen-revisions/index.d.ts +6 -0
  530. package/build-types/screen-revisions/index.d.ts.map +1 -0
  531. package/build-types/screen-revisions/revisions-buttons.d.ts +23 -0
  532. package/build-types/screen-revisions/revisions-buttons.d.ts.map +1 -0
  533. package/build-types/screen-revisions/types.d.ts +17 -0
  534. package/build-types/screen-revisions/types.d.ts.map +1 -0
  535. package/build-types/screen-revisions/use-global-styles-revisions.d.ts +17 -0
  536. package/build-types/screen-revisions/use-global-styles-revisions.d.ts.map +1 -0
  537. package/build-types/screen-root.d.ts +3 -0
  538. package/build-types/screen-root.d.ts.map +1 -0
  539. package/build-types/screen-shadows.d.ts +3 -0
  540. package/build-types/screen-shadows.d.ts.map +1 -0
  541. package/build-types/screen-style-variations.d.ts +3 -0
  542. package/build-types/screen-style-variations.d.ts.map +1 -0
  543. package/build-types/screen-typography-element.d.ts +28 -0
  544. package/build-types/screen-typography-element.d.ts.map +1 -0
  545. package/build-types/screen-typography.d.ts +3 -0
  546. package/build-types/screen-typography.d.ts.map +1 -0
  547. package/build-types/shadow-utils.d.ts +126 -0
  548. package/build-types/shadow-utils.d.ts.map +1 -0
  549. package/build-types/shadows-edit-panel.d.ts +2 -0
  550. package/build-types/shadows-edit-panel.d.ts.map +1 -0
  551. package/build-types/shadows-panel.d.ts +3 -0
  552. package/build-types/shadows-panel.d.ts.map +1 -0
  553. package/build-types/size-control/index.d.ts +11 -0
  554. package/build-types/size-control/index.d.ts.map +1 -0
  555. package/build-types/stories/index.story.d.ts +6 -0
  556. package/build-types/stories/index.story.d.ts.map +1 -0
  557. package/build-types/style-variations-container.d.ts +6 -0
  558. package/build-types/style-variations-container.d.ts.map +1 -0
  559. package/build-types/style-variations-content.d.ts +2 -0
  560. package/build-types/style-variations-content.d.ts.map +1 -0
  561. package/build-types/style-variations.d.ts +25 -0
  562. package/build-types/style-variations.d.ts.map +1 -0
  563. package/build-types/subtitle.d.ts +7 -0
  564. package/build-types/subtitle.d.ts.map +1 -0
  565. package/build-types/test/shadow-utils.spec.d.ts +2 -0
  566. package/build-types/test/shadow-utils.spec.d.ts.map +1 -0
  567. package/build-types/test/utils.spec.d.ts +2 -0
  568. package/build-types/test/utils.spec.d.ts.map +1 -0
  569. package/build-types/typography-elements.d.ts +3 -0
  570. package/build-types/typography-elements.d.ts.map +1 -0
  571. package/build-types/typography-example.d.ts +7 -0
  572. package/build-types/typography-example.d.ts.map +1 -0
  573. package/build-types/typography-panel.d.ts +7 -0
  574. package/build-types/typography-panel.d.ts.map +1 -0
  575. package/build-types/typography-preview.d.ts +8 -0
  576. package/build-types/typography-preview.d.ts.map +1 -0
  577. package/build-types/typography-variations.d.ts +27 -0
  578. package/build-types/typography-variations.d.ts.map +1 -0
  579. package/build-types/utils.d.ts +63 -0
  580. package/build-types/utils.d.ts.map +1 -0
  581. package/build-types/variations/variation.d.ts +10 -0
  582. package/build-types/variations/variation.d.ts.map +1 -0
  583. package/build-types/variations/variations-color.d.ts +7 -0
  584. package/build-types/variations/variations-color.d.ts.map +1 -0
  585. package/build-types/variations/variations-panel.d.ts +13 -0
  586. package/build-types/variations/variations-panel.d.ts.map +1 -0
  587. package/build-types/variations/variations-typography.d.ts +7 -0
  588. package/build-types/variations/variations-typography.d.ts.map +1 -0
  589. package/build-types/with-global-styles-provider.d.ts +20 -0
  590. package/build-types/with-global-styles-provider.d.ts.map +1 -0
  591. package/package.json +67 -0
  592. package/src/README.md +99 -0
  593. package/src/background-panel.tsx +56 -0
  594. package/src/block-preview-panel.tsx +91 -0
  595. package/src/color-indicator-wrapper.tsx +34 -0
  596. package/src/color-palette-panel.tsx +111 -0
  597. package/src/color-preview.tsx +78 -0
  598. package/src/color-variations.tsx +35 -0
  599. package/src/confirm-reset-shadow-dialog.tsx +45 -0
  600. package/src/context.ts +21 -0
  601. package/src/dimensions-panel.tsx +85 -0
  602. package/src/font-families.tsx +127 -0
  603. package/src/font-family-item.tsx +52 -0
  604. package/src/font-library-modal/collection-font-variant.tsx +52 -0
  605. package/src/font-library-modal/context.tsx +591 -0
  606. package/src/font-library-modal/font-card.tsx +77 -0
  607. package/src/font-library-modal/font-collection.tsx +592 -0
  608. package/src/font-library-modal/font-demo.tsx +123 -0
  609. package/src/font-library-modal/google-fonts-confirm-dialog.tsx +57 -0
  610. package/src/font-library-modal/index.tsx +110 -0
  611. package/src/font-library-modal/installed-fonts.tsx +547 -0
  612. package/src/font-library-modal/lib/inflate.js +4112 -0
  613. package/src/font-library-modal/lib/lib-font.browser.d.ts +11 -0
  614. package/src/font-library-modal/lib/lib-font.browser.js +3861 -0
  615. package/src/font-library-modal/lib/unbrotli.js +2706 -0
  616. package/src/font-library-modal/library-font-details.tsx +46 -0
  617. package/src/font-library-modal/library-font-variant.tsx +67 -0
  618. package/src/font-library-modal/resolvers.tsx +100 -0
  619. package/src/font-library-modal/style.scss +222 -0
  620. package/src/font-library-modal/types.ts +176 -0
  621. package/src/font-library-modal/upload-fonts.tsx +269 -0
  622. package/src/font-library-modal/utils/constants.ts +23 -0
  623. package/src/font-library-modal/utils/filter-fonts.ts +47 -0
  624. package/src/font-library-modal/utils/fonts-outline.ts +33 -0
  625. package/src/font-library-modal/utils/index.ts +368 -0
  626. package/src/font-library-modal/utils/make-families-from-faces.ts +34 -0
  627. package/src/font-library-modal/utils/preview-styles.ts +167 -0
  628. package/src/font-library-modal/utils/set-immutably.ts +37 -0
  629. package/src/font-library-modal/utils/sort-font-faces.ts +46 -0
  630. package/src/font-library-modal/utils/toggleFont.ts +109 -0
  631. package/src/font-sizes/confirm-delete-font-size-dialog.tsx +51 -0
  632. package/src/font-sizes/confirm-reset-font-sizes-dialog.tsx +45 -0
  633. package/src/font-sizes/font-size-preview.tsx +47 -0
  634. package/src/font-sizes/font-size.tsx +289 -0
  635. package/src/font-sizes/font-sizes-count.tsx +37 -0
  636. package/src/font-sizes/font-sizes.tsx +265 -0
  637. package/src/font-sizes/rename-font-size-dialog.tsx +83 -0
  638. package/src/global-styles-ui.tsx +292 -0
  639. package/src/gradients-palette-panel.tsx +126 -0
  640. package/src/highlighted-colors.tsx +44 -0
  641. package/src/hooks.ts +251 -0
  642. package/src/icon-with-current-color.tsx +31 -0
  643. package/src/index.ts +7 -0
  644. package/src/lock-unlock.ts +10 -0
  645. package/src/navigation-button.tsx +53 -0
  646. package/src/pagination/index.tsx +107 -0
  647. package/src/pagination/style.scss +7 -0
  648. package/src/palette.tsx +101 -0
  649. package/src/preset-colors.tsx +18 -0
  650. package/src/preview-colors.tsx +68 -0
  651. package/src/preview-hooks.tsx +58 -0
  652. package/src/preview-styles.tsx +196 -0
  653. package/src/preview-typography.tsx +49 -0
  654. package/src/preview-wrapper.tsx +137 -0
  655. package/src/provider.tsx +54 -0
  656. package/src/root-menu.tsx +87 -0
  657. package/src/screen-background.tsx +37 -0
  658. package/src/screen-block-list.tsx +198 -0
  659. package/src/screen-block.tsx +370 -0
  660. package/src/screen-color-palette.tsx +47 -0
  661. package/src/screen-colors.tsx +67 -0
  662. package/src/screen-css.tsx +56 -0
  663. package/src/screen-header.tsx +56 -0
  664. package/src/screen-layout.tsx +34 -0
  665. package/src/screen-revisions/index.tsx +158 -0
  666. package/src/screen-revisions/revisions-buttons.tsx +259 -0
  667. package/src/screen-revisions/style.scss +194 -0
  668. package/src/screen-revisions/types.ts +18 -0
  669. package/src/screen-revisions/use-global-styles-revisions.tsx +204 -0
  670. package/src/screen-root.tsx +146 -0
  671. package/src/screen-shadows.tsx +13 -0
  672. package/src/screen-style-variations.tsx +36 -0
  673. package/src/screen-typography-element.tsx +127 -0
  674. package/src/screen-typography.tsx +41 -0
  675. package/src/shadow-utils.ts +167 -0
  676. package/src/shadows-edit-panel.tsx +559 -0
  677. package/src/shadows-panel.tsx +207 -0
  678. package/src/size-control/index.tsx +97 -0
  679. package/src/size-control/style.scss +7 -0
  680. package/src/stories/index.story.js +410 -0
  681. package/src/style-variations-container.tsx +153 -0
  682. package/src/style-variations-content.tsx +24 -0
  683. package/src/style-variations.tsx +33 -0
  684. package/src/style.scss +287 -0
  685. package/src/subtitle.tsx +17 -0
  686. package/src/test/shadow-utils.spec.js +251 -0
  687. package/src/test/utils.spec.js +59 -0
  688. package/src/typography-elements.tsx +113 -0
  689. package/src/typography-example.tsx +78 -0
  690. package/src/typography-panel.tsx +56 -0
  691. package/src/typography-preview.tsx +61 -0
  692. package/src/typography-variations.tsx +35 -0
  693. package/src/utils.ts +301 -0
  694. package/src/variations/style.scss +43 -0
  695. package/src/variations/variation.tsx +113 -0
  696. package/src/variations/variations-color.tsx +54 -0
  697. package/src/variations/variations-panel.tsx +79 -0
  698. package/src/variations/variations-typography.tsx +65 -0
  699. package/src/with-global-styles-provider.tsx +44 -0
  700. package/tsconfig.json +26 -0
  701. package/tsconfig.tsbuildinfo +1 -0
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var preview_colors_exports = {};
30
+ __export(preview_colors_exports, {
31
+ default: () => preview_colors_default
32
+ });
33
+ module.exports = __toCommonJS(preview_colors_exports);
34
+ var import_jsx_runtime = require("react/jsx-runtime");
35
+ var import_components = require("@wordpress/components");
36
+ var import_preset_colors = __toESM(require("./preset-colors"));
37
+ var import_preview_wrapper = __toESM(require("./preview-wrapper"));
38
+ const firstFrameVariants = {
39
+ start: {
40
+ scale: 1,
41
+ opacity: 1
42
+ },
43
+ hover: {
44
+ scale: 0,
45
+ opacity: 0
46
+ }
47
+ };
48
+ const StylesPreviewColors = ({
49
+ label,
50
+ isFocused,
51
+ withHoverView
52
+ }) => {
53
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
54
+ import_preview_wrapper.default,
55
+ {
56
+ label,
57
+ isFocused,
58
+ withHoverView,
59
+ children: ({ key }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
60
+ import_components.__unstableMotion.div,
61
+ {
62
+ variants: firstFrameVariants,
63
+ style: {
64
+ height: "100%",
65
+ overflow: "hidden"
66
+ },
67
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
68
+ import_components.__experimentalHStack,
69
+ {
70
+ spacing: 0,
71
+ justify: "center",
72
+ style: {
73
+ height: "100%",
74
+ overflow: "hidden"
75
+ },
76
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_preset_colors.default, {})
77
+ }
78
+ )
79
+ },
80
+ key
81
+ )
82
+ }
83
+ );
84
+ };
85
+ var preview_colors_default = StylesPreviewColors;
86
+ //# sourceMappingURL=preview-colors.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/preview-colors.tsx"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport PresetColors from './preset-colors';\nimport PreviewWrapper from './preview-wrapper';\n\nconst firstFrameVariants = {\n\tstart: {\n\t\tscale: 1,\n\t\topacity: 1,\n\t},\n\thover: {\n\t\tscale: 0,\n\t\topacity: 0,\n\t},\n};\n\ninterface StylesPreviewColorsProps {\n\tlabel?: string;\n\tisFocused?: boolean;\n\twithHoverView?: boolean;\n}\n\nconst StylesPreviewColors = ( {\n\tlabel,\n\tisFocused,\n\twithHoverView,\n}: StylesPreviewColorsProps ) => {\n\treturn (\n\t\t<PreviewWrapper\n\t\t\tlabel={ label }\n\t\t\tisFocused={ isFocused }\n\t\t\twithHoverView={ withHoverView }\n\t\t>\n\t\t\t{ ( { key } ) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvariants={ firstFrameVariants }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PresetColors />\n\t\t\t\t\t</HStack>\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t</PreviewWrapper>\n\t);\n};\n\nexport default StylesPreviewColors;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2DM;AAxDN,wBAGO;AAKP,2BAAyB;AACzB,6BAA2B;AAE3B,MAAM,qBAAqB;AAAA,EAC1B,OAAO;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,EACV;AAAA,EACA,OAAO;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,EACV;AACD;AAQA,MAAM,sBAAsB,CAAE;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AACD,MAAiC;AAChC,SACC;AAAA,IAAC,uBAAAA;AAAA,IAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEE,WAAE,EAAE,IAAI,MACT;AAAA,QAAC,kBAAAC,iBAAO;AAAA,QAAP;AAAA,UAEA,UAAW;AAAA,UACX,OAAQ;AAAA,YACP,QAAQ;AAAA,YACR,UAAU;AAAA,UACX;AAAA,UAEA;AAAA,YAAC,kBAAAC;AAAA,YAAA;AAAA,cACA,SAAU;AAAA,cACV,SAAQ;AAAA,cACR,OAAQ;AAAA,gBACP,QAAQ;AAAA,gBACR,UAAU;AAAA,cACX;AAAA,cAEA,sDAAC,qBAAAC,SAAA,EAAa;AAAA;AAAA,UACf;AAAA;AAAA,QAhBM;AAAA,MAiBP;AAAA;AAAA,EAEF;AAEF;AAEA,IAAO,yBAAQ;",
6
+ "names": ["PreviewWrapper", "motion", "HStack", "PresetColors"]
7
+ }
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var preview_hooks_exports = {};
20
+ __export(preview_hooks_exports, {
21
+ useStylesPreviewColors: () => useStylesPreviewColors
22
+ });
23
+ module.exports = __toCommonJS(preview_hooks_exports);
24
+ var import_hooks = require("./hooks");
25
+ function useStylesPreviewColors() {
26
+ const [textColor = "black"] = (0, import_hooks.useStyle)("color.text");
27
+ const [backgroundColor = "white"] = (0, import_hooks.useStyle)("color.background");
28
+ const [headingColor = textColor] = (0, import_hooks.useStyle)(
29
+ "elements.h1.color.text"
30
+ );
31
+ const [linkColor = headingColor] = (0, import_hooks.useStyle)(
32
+ "elements.link.color.text"
33
+ );
34
+ const [buttonBackgroundColor = linkColor] = (0, import_hooks.useStyle)(
35
+ "elements.button.color.background"
36
+ );
37
+ const [coreColors] = (0, import_hooks.useSetting)("color.palette.core") || [];
38
+ const [themeColors] = (0, import_hooks.useSetting)("color.palette.theme") || [];
39
+ const [customColors] = (0, import_hooks.useSetting)("color.palette.custom") || [];
40
+ const paletteColors = (themeColors ?? []).concat(customColors ?? []).concat(coreColors ?? []);
41
+ const textColorObject = paletteColors.filter(
42
+ ({ color }) => color === textColor
43
+ );
44
+ const buttonBackgroundColorObject = paletteColors.filter(
45
+ ({ color }) => color === buttonBackgroundColor
46
+ );
47
+ const highlightedColors = textColorObject.concat(buttonBackgroundColorObject).concat(paletteColors).filter(
48
+ // we exclude these background color because it is already visible in the preview.
49
+ ({ color }) => color !== backgroundColor
50
+ ).slice(0, 2);
51
+ return {
52
+ paletteColors,
53
+ highlightedColors
54
+ };
55
+ }
56
+ // Annotate the CommonJS export names for ESM import in node:
57
+ 0 && (module.exports = {
58
+ useStylesPreviewColors
59
+ });
60
+ //# sourceMappingURL=preview-hooks.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/preview-hooks.tsx"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport type { Color } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { useSetting, useStyle } from './hooks';\n\nexport function useStylesPreviewColors(): {\n\tpaletteColors: Color[];\n\thighlightedColors: Color[];\n} {\n\tconst [ textColor = 'black' ] = useStyle< string >( 'color.text' );\n\tconst [ backgroundColor = 'white' ] =\n\t\tuseStyle< string >( 'color.background' );\n\tconst [ headingColor = textColor ] = useStyle< string >(\n\t\t'elements.h1.color.text'\n\t);\n\tconst [ linkColor = headingColor ] = useStyle< string >(\n\t\t'elements.link.color.text'\n\t);\n\tconst [ buttonBackgroundColor = linkColor ] = useStyle< string >(\n\t\t'elements.button.color.background'\n\t);\n\n\tconst [ coreColors ] = useSetting< Color[] >( 'color.palette.core' ) || [];\n\tconst [ themeColors ] =\n\t\tuseSetting< Color[] >( 'color.palette.theme' ) || [];\n\tconst [ customColors ] =\n\t\tuseSetting< Color[] >( 'color.palette.custom' ) || [];\n\n\tconst paletteColors: Color[] = ( themeColors ?? [] )\n\t\t.concat( customColors ?? [] )\n\t\t.concat( coreColors ?? [] );\n\n\tconst textColorObject = paletteColors.filter(\n\t\t( { color } ) => color === textColor\n\t);\n\tconst buttonBackgroundColorObject = paletteColors.filter(\n\t\t( { color } ) => color === buttonBackgroundColor\n\t);\n\n\tconst highlightedColors = textColorObject\n\t\t.concat( buttonBackgroundColorObject )\n\t\t.concat( paletteColors )\n\t\t.filter(\n\t\t\t// we exclude these background color because it is already visible in the preview.\n\t\t\t( { color } ) => color !== backgroundColor\n\t\t)\n\t\t.slice( 0, 2 );\n\n\treturn {\n\t\tpaletteColors,\n\t\thighlightedColors,\n\t};\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,mBAAqC;AAE9B,SAAS,yBAGd;AACD,QAAM,CAAE,YAAY,OAAQ,QAAI,uBAAoB,YAAa;AACjE,QAAM,CAAE,kBAAkB,OAAQ,QACjC,uBAAoB,kBAAmB;AACxC,QAAM,CAAE,eAAe,SAAU,QAAI;AAAA,IACpC;AAAA,EACD;AACA,QAAM,CAAE,YAAY,YAAa,QAAI;AAAA,IACpC;AAAA,EACD;AACA,QAAM,CAAE,wBAAwB,SAAU,QAAI;AAAA,IAC7C;AAAA,EACD;AAEA,QAAM,CAAE,UAAW,QAAI,yBAAuB,oBAAqB,KAAK,CAAC;AACzE,QAAM,CAAE,WAAY,QACnB,yBAAuB,qBAAsB,KAAK,CAAC;AACpD,QAAM,CAAE,YAAa,QACpB,yBAAuB,sBAAuB,KAAK,CAAC;AAErD,QAAM,iBAA2B,eAAe,CAAC,GAC/C,OAAQ,gBAAgB,CAAC,CAAE,EAC3B,OAAQ,cAAc,CAAC,CAAE;AAE3B,QAAM,kBAAkB,cAAc;AAAA,IACrC,CAAE,EAAE,MAAM,MAAO,UAAU;AAAA,EAC5B;AACA,QAAM,8BAA8B,cAAc;AAAA,IACjD,CAAE,EAAE,MAAM,MAAO,UAAU;AAAA,EAC5B;AAEA,QAAM,oBAAoB,gBACxB,OAAQ,2BAA4B,EACpC,OAAQ,aAAc,EACtB;AAAA;AAAA,IAEA,CAAE,EAAE,MAAM,MAAO,UAAU;AAAA,EAC5B,EACC,MAAO,GAAG,CAAE;AAEd,SAAO;AAAA,IACN;AAAA,IACA;AAAA,EACD;AACD;",
6
+ "names": []
7
+ }
@@ -0,0 +1,219 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var preview_styles_exports = {};
30
+ __export(preview_styles_exports, {
31
+ default: () => preview_styles_default
32
+ });
33
+ module.exports = __toCommonJS(preview_styles_exports);
34
+ var import_jsx_runtime = require("react/jsx-runtime");
35
+ var import_components = require("@wordpress/components");
36
+ var import_hooks = require("./hooks");
37
+ var import_preview_hooks = require("./preview-hooks");
38
+ var import_typography_example = __toESM(require("./typography-example"));
39
+ var import_highlighted_colors = __toESM(require("./highlighted-colors"));
40
+ var import_preview_wrapper = __toESM(require("./preview-wrapper"));
41
+ const firstFrameVariants = {
42
+ start: {
43
+ scale: 1,
44
+ opacity: 1
45
+ },
46
+ hover: {
47
+ scale: 0,
48
+ opacity: 0
49
+ }
50
+ };
51
+ const midFrameVariants = {
52
+ hover: {
53
+ opacity: 1
54
+ },
55
+ start: {
56
+ opacity: 0.5
57
+ }
58
+ };
59
+ const secondFrameVariants = {
60
+ hover: {
61
+ scale: 1,
62
+ opacity: 1
63
+ },
64
+ start: {
65
+ scale: 0,
66
+ opacity: 0
67
+ }
68
+ };
69
+ function PreviewStyles({
70
+ label,
71
+ isFocused,
72
+ withHoverView,
73
+ variation
74
+ }) {
75
+ const [fontWeight] = (0, import_hooks.useStyle)("typography.fontWeight");
76
+ const [fontFamily = "serif"] = (0, import_hooks.useStyle)(
77
+ "typography.fontFamily"
78
+ );
79
+ const [headingFontFamily = fontFamily] = (0, import_hooks.useStyle)(
80
+ "elements.h1.typography.fontFamily"
81
+ );
82
+ const [headingFontWeight = fontWeight] = (0, import_hooks.useStyle)(
83
+ "elements.h1.typography.fontWeight"
84
+ );
85
+ const [textColor = "black"] = (0, import_hooks.useStyle)("color.text");
86
+ const [headingColor = textColor] = (0, import_hooks.useStyle)(
87
+ "elements.h1.color.text"
88
+ );
89
+ const { paletteColors } = (0, import_preview_hooks.useStylesPreviewColors)();
90
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
91
+ import_preview_wrapper.default,
92
+ {
93
+ label,
94
+ isFocused,
95
+ withHoverView,
96
+ children: [
97
+ ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
98
+ import_components.__unstableMotion.div,
99
+ {
100
+ variants: firstFrameVariants,
101
+ style: {
102
+ height: "100%",
103
+ overflow: "hidden"
104
+ },
105
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
106
+ import_components.__experimentalHStack,
107
+ {
108
+ spacing: 10 * ratio,
109
+ justify: "center",
110
+ style: {
111
+ height: "100%",
112
+ overflow: "hidden"
113
+ },
114
+ children: [
115
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
116
+ import_typography_example.default,
117
+ {
118
+ fontSize: 65 * ratio,
119
+ variation
120
+ }
121
+ ),
122
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.__experimentalVStack, { spacing: 4 * ratio, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
123
+ import_highlighted_colors.default,
124
+ {
125
+ normalizedColorSwatchSize: 32,
126
+ ratio
127
+ }
128
+ ) })
129
+ ]
130
+ }
131
+ )
132
+ },
133
+ key
134
+ ),
135
+ ({ key }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
136
+ import_components.__unstableMotion.div,
137
+ {
138
+ variants: withHoverView ? midFrameVariants : void 0,
139
+ style: {
140
+ height: "100%",
141
+ width: "100%",
142
+ position: "absolute",
143
+ top: 0,
144
+ overflow: "hidden",
145
+ filter: "blur(60px)",
146
+ opacity: 0.1
147
+ },
148
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
149
+ import_components.__experimentalHStack,
150
+ {
151
+ spacing: 0,
152
+ justify: "flex-start",
153
+ style: {
154
+ height: "100%",
155
+ overflow: "hidden"
156
+ },
157
+ children: paletteColors.slice(0, 4).map(({ color }, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
158
+ "div",
159
+ {
160
+ style: {
161
+ height: "100%",
162
+ background: color,
163
+ flexGrow: 1
164
+ }
165
+ },
166
+ index
167
+ ))
168
+ }
169
+ )
170
+ },
171
+ key
172
+ ),
173
+ ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
174
+ import_components.__unstableMotion.div,
175
+ {
176
+ variants: secondFrameVariants,
177
+ style: {
178
+ height: "100%",
179
+ width: "100%",
180
+ overflow: "hidden",
181
+ position: "absolute",
182
+ top: 0
183
+ },
184
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
185
+ import_components.__experimentalVStack,
186
+ {
187
+ spacing: 3 * ratio,
188
+ justify: "center",
189
+ style: {
190
+ height: "100%",
191
+ overflow: "hidden",
192
+ padding: 10 * ratio,
193
+ boxSizing: "border-box"
194
+ },
195
+ children: label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
196
+ "div",
197
+ {
198
+ style: {
199
+ fontSize: 40 * ratio,
200
+ fontFamily: headingFontFamily,
201
+ color: headingColor,
202
+ fontWeight: headingFontWeight,
203
+ lineHeight: "1em",
204
+ textAlign: "center"
205
+ },
206
+ children: label
207
+ }
208
+ )
209
+ }
210
+ )
211
+ },
212
+ key
213
+ )
214
+ ]
215
+ }
216
+ );
217
+ }
218
+ var preview_styles_default = PreviewStyles;
219
+ //# sourceMappingURL=preview-styles.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/preview-styles.tsx"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { useStyle } from './hooks';\nimport { useStylesPreviewColors } from './preview-hooks';\nimport TypographyExample from './typography-example';\nimport HighlightedColors from './highlighted-colors';\nimport PreviewWrapper from './preview-wrapper';\n\nconst firstFrameVariants = {\n\tstart: {\n\t\tscale: 1,\n\t\topacity: 1,\n\t},\n\thover: {\n\t\tscale: 0,\n\t\topacity: 0,\n\t},\n};\n\nconst midFrameVariants = {\n\thover: {\n\t\topacity: 1,\n\t},\n\tstart: {\n\t\topacity: 0.5,\n\t},\n};\n\nconst secondFrameVariants = {\n\thover: {\n\t\tscale: 1,\n\t\topacity: 1,\n\t},\n\tstart: {\n\t\tscale: 0,\n\t\topacity: 0,\n\t},\n};\n\ninterface PreviewStylesProps {\n\tlabel?: string;\n\tisFocused?: boolean;\n\twithHoverView?: boolean;\n\tvariation?: any;\n}\n\nfunction PreviewStyles( {\n\tlabel,\n\tisFocused,\n\twithHoverView,\n\tvariation,\n}: PreviewStylesProps ) {\n\tconst [ fontWeight ] = useStyle< string >( 'typography.fontWeight' );\n\tconst [ fontFamily = 'serif' ] = useStyle< string >(\n\t\t'typography.fontFamily'\n\t);\n\tconst [ headingFontFamily = fontFamily ] = useStyle< string >(\n\t\t'elements.h1.typography.fontFamily'\n\t);\n\tconst [ headingFontWeight = fontWeight ] = useStyle< string >(\n\t\t'elements.h1.typography.fontWeight'\n\t);\n\tconst [ textColor = 'black' ] = useStyle< string >( 'color.text' );\n\tconst [ headingColor = textColor ] = useStyle< string >(\n\t\t'elements.h1.color.text'\n\t);\n\n\tconst { paletteColors } = useStylesPreviewColors();\n\n\treturn (\n\t\t<PreviewWrapper\n\t\t\tlabel={ label }\n\t\t\tisFocused={ isFocused }\n\t\t\twithHoverView={ withHoverView }\n\t\t>\n\t\t\t{ ( { ratio, key } ) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvariants={ firstFrameVariants }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tspacing={ 10 * ratio }\n\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<TypographyExample\n\t\t\t\t\t\t\tfontSize={ 65 * ratio }\n\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<VStack spacing={ 4 * ratio }>\n\t\t\t\t\t\t\t<HighlightedColors\n\t\t\t\t\t\t\t\tnormalizedColorSwatchSize={ 32 }\n\t\t\t\t\t\t\t\tratio={ ratio }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t</HStack>\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t\t{ ( { key } ) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvariants={ withHoverView ? midFrameVariants : undefined }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\tfilter: 'blur(60px)',\n\t\t\t\t\t\topacity: 0.1,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ paletteColors\n\t\t\t\t\t\t\t.slice( 0, 4 )\n\t\t\t\t\t\t\t.map( ( { color }, index ) => (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t\tbackground: color,\n\t\t\t\t\t\t\t\t\t\tflexGrow: 1,\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t</HStack>\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t\t{ ( { ratio, key } ) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvariants={ secondFrameVariants }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<VStack\n\t\t\t\t\t\tspacing={ 3 * ratio }\n\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\tpadding: 10 * ratio,\n\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\tfontSize: 40 * ratio,\n\t\t\t\t\t\t\t\t\tfontFamily: headingFontFamily,\n\t\t\t\t\t\t\t\t\tcolor: headingColor,\n\t\t\t\t\t\t\t\t\tfontWeight: headingFontWeight,\n\t\t\t\t\t\t\t\t\tlineHeight: '1em',\n\t\t\t\t\t\t\t\t\ttextAlign: 'center',\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{ label }\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</VStack>\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t</PreviewWrapper>\n\t);\n}\n\nexport default PreviewStyles;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA8FK;AA3FL,wBAIO;AAKP,mBAAyB;AACzB,2BAAuC;AACvC,gCAA8B;AAC9B,gCAA8B;AAC9B,6BAA2B;AAE3B,MAAM,qBAAqB;AAAA,EAC1B,OAAO;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,EACV;AAAA,EACA,OAAO;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,EACV;AACD;AAEA,MAAM,mBAAmB;AAAA,EACxB,OAAO;AAAA,IACN,SAAS;AAAA,EACV;AAAA,EACA,OAAO;AAAA,IACN,SAAS;AAAA,EACV;AACD;AAEA,MAAM,sBAAsB;AAAA,EAC3B,OAAO;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,EACV;AAAA,EACA,OAAO;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,EACV;AACD;AASA,SAAS,cAAe;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAwB;AACvB,QAAM,CAAE,UAAW,QAAI,uBAAoB,uBAAwB;AACnE,QAAM,CAAE,aAAa,OAAQ,QAAI;AAAA,IAChC;AAAA,EACD;AACA,QAAM,CAAE,oBAAoB,UAAW,QAAI;AAAA,IAC1C;AAAA,EACD;AACA,QAAM,CAAE,oBAAoB,UAAW,QAAI;AAAA,IAC1C;AAAA,EACD;AACA,QAAM,CAAE,YAAY,OAAQ,QAAI,uBAAoB,YAAa;AACjE,QAAM,CAAE,eAAe,SAAU,QAAI;AAAA,IACpC;AAAA,EACD;AAEA,QAAM,EAAE,cAAc,QAAI,6CAAuB;AAEjD,SACC;AAAA,IAAC,uBAAAA;AAAA,IAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEE;AAAA,SAAE,EAAE,OAAO,IAAI,MAChB;AAAA,UAAC,kBAAAC,iBAAO;AAAA,UAAP;AAAA,YAEA,UAAW;AAAA,YACX,OAAQ;AAAA,cACP,QAAQ;AAAA,cACR,UAAU;AAAA,YACX;AAAA,YAEA;AAAA,cAAC,kBAAAC;AAAA,cAAA;AAAA,gBACA,SAAU,KAAK;AAAA,gBACf,SAAQ;AAAA,gBACR,OAAQ;AAAA,kBACP,QAAQ;AAAA,kBACR,UAAU;AAAA,gBACX;AAAA,gBAEA;AAAA;AAAA,oBAAC,0BAAAC;AAAA,oBAAA;AAAA,sBACA,UAAW,KAAK;AAAA,sBAChB;AAAA;AAAA,kBACD;AAAA,kBACA,4CAAC,kBAAAC,sBAAA,EAAO,SAAU,IAAI,OACrB;AAAA,oBAAC,0BAAAC;AAAA,oBAAA;AAAA,sBACA,2BAA4B;AAAA,sBAC5B;AAAA;AAAA,kBACD,GACD;AAAA;AAAA;AAAA,YACD;AAAA;AAAA,UAzBM;AAAA,QA0BP;AAAA,QAEC,CAAE,EAAE,IAAI,MACT;AAAA,UAAC,kBAAAJ,iBAAO;AAAA,UAAP;AAAA,YAEA,UAAW,gBAAgB,mBAAmB;AAAA,YAC9C,OAAQ;AAAA,cACP,QAAQ;AAAA,cACR,OAAO;AAAA,cACP,UAAU;AAAA,cACV,KAAK;AAAA,cACL,UAAU;AAAA,cACV,QAAQ;AAAA,cACR,SAAS;AAAA,YACV;AAAA,YAEA;AAAA,cAAC,kBAAAC;AAAA,cAAA;AAAA,gBACA,SAAU;AAAA,gBACV,SAAQ;AAAA,gBACR,OAAQ;AAAA,kBACP,QAAQ;AAAA,kBACR,UAAU;AAAA,gBACX;AAAA,gBAEE,wBACA,MAAO,GAAG,CAAE,EACZ,IAAK,CAAE,EAAE,MAAM,GAAG,UAClB;AAAA,kBAAC;AAAA;AAAA,oBAEA,OAAQ;AAAA,sBACP,QAAQ;AAAA,sBACR,YAAY;AAAA,sBACZ,UAAU;AAAA,oBACX;AAAA;AAAA,kBALM;AAAA,gBAMP,CACC;AAAA;AAAA,YACJ;AAAA;AAAA,UAhCM;AAAA,QAiCP;AAAA,QAEC,CAAE,EAAE,OAAO,IAAI,MAChB;AAAA,UAAC,kBAAAD,iBAAO;AAAA,UAAP;AAAA,YAEA,UAAW;AAAA,YACX,OAAQ;AAAA,cACP,QAAQ;AAAA,cACR,OAAO;AAAA,cACP,UAAU;AAAA,cACV,UAAU;AAAA,cACV,KAAK;AAAA,YACN;AAAA,YAEA;AAAA,cAAC,kBAAAG;AAAA,cAAA;AAAA,gBACA,SAAU,IAAI;AAAA,gBACd,SAAQ;AAAA,gBACR,OAAQ;AAAA,kBACP,QAAQ;AAAA,kBACR,UAAU;AAAA,kBACV,SAAS,KAAK;AAAA,kBACd,WAAW;AAAA,gBACZ;AAAA,gBAEE,mBACD;AAAA,kBAAC;AAAA;AAAA,oBACA,OAAQ;AAAA,sBACP,UAAU,KAAK;AAAA,sBACf,YAAY;AAAA,sBACZ,OAAO;AAAA,sBACP,YAAY;AAAA,sBACZ,YAAY;AAAA,sBACZ,WAAW;AAAA,oBACZ;AAAA,oBAEE;AAAA;AAAA,gBACH;AAAA;AAAA,YAEF;AAAA;AAAA,UAlCM;AAAA,QAmCP;AAAA;AAAA;AAAA,EAEF;AAEF;AAEA,IAAO,yBAAQ;",
6
+ "names": ["PreviewWrapper", "motion", "HStack", "TypographyExample", "VStack", "HighlightedColors"]
7
+ }
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var preview_typography_exports = {};
30
+ __export(preview_typography_exports, {
31
+ default: () => preview_typography_default
32
+ });
33
+ module.exports = __toCommonJS(preview_typography_exports);
34
+ var import_jsx_runtime = require("react/jsx-runtime");
35
+ var import_components = require("@wordpress/components");
36
+ var import_typography_example = __toESM(require("./typography-example"));
37
+ var import_preview_wrapper = __toESM(require("./preview-wrapper"));
38
+ const StylesPreviewTypography = ({
39
+ variation,
40
+ isFocused,
41
+ withHoverView
42
+ }) => {
43
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
+ import_preview_wrapper.default,
45
+ {
46
+ label: variation.title,
47
+ isFocused,
48
+ withHoverView,
49
+ children: ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
50
+ import_components.__experimentalHStack,
51
+ {
52
+ spacing: 10 * ratio,
53
+ justify: "center",
54
+ style: {
55
+ height: "100%",
56
+ overflow: "hidden"
57
+ },
58
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
59
+ import_typography_example.default,
60
+ {
61
+ variation,
62
+ fontSize: 85 * ratio
63
+ }
64
+ )
65
+ },
66
+ key
67
+ )
68
+ }
69
+ );
70
+ };
71
+ var preview_typography_default = StylesPreviewTypography;
72
+ //# sourceMappingURL=preview-typography.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/preview-typography.tsx"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport TypographyExample from './typography-example';\nimport PreviewWrapper from './preview-wrapper';\n\ninterface StylesPreviewTypographyProps {\n\tvariation: any;\n\tisFocused?: boolean;\n\twithHoverView?: boolean;\n}\n\nconst StylesPreviewTypography = ( {\n\tvariation,\n\tisFocused,\n\twithHoverView,\n}: StylesPreviewTypographyProps ) => {\n\treturn (\n\t\t<PreviewWrapper\n\t\t\tlabel={ variation.title }\n\t\t\tisFocused={ isFocused }\n\t\t\twithHoverView={ withHoverView }\n\t\t>\n\t\t\t{ ( { ratio, key } ) => (\n\t\t\t\t<HStack\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tspacing={ 10 * ratio }\n\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<TypographyExample\n\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\tfontSize={ 85 * ratio }\n\t\t\t\t\t/>\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t</PreviewWrapper>\n\t);\n};\n\nexport default StylesPreviewTypography;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsCK;AAnCL,wBAA+C;AAK/C,gCAA8B;AAC9B,6BAA2B;AAQ3B,MAAM,0BAA0B,CAAE;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AACD,MAAqC;AACpC,SACC;AAAA,IAAC,uBAAAA;AAAA,IAAA;AAAA,MACA,OAAQ,UAAU;AAAA,MAClB;AAAA,MACA;AAAA,MAEE,WAAE,EAAE,OAAO,IAAI,MAChB;AAAA,QAAC,kBAAAC;AAAA,QAAA;AAAA,UAEA,SAAU,KAAK;AAAA,UACf,SAAQ;AAAA,UACR,OAAQ;AAAA,YACP,QAAQ;AAAA,YACR,UAAU;AAAA,UACX;AAAA,UAEA;AAAA,YAAC,0BAAAC;AAAA,YAAA;AAAA,cACA;AAAA,cACA,UAAW,KAAK;AAAA;AAAA,UACjB;AAAA;AAAA,QAXM;AAAA,MAYP;AAAA;AAAA,EAEF;AAEF;AAEA,IAAO,6BAAQ;",
6
+ "names": ["PreviewWrapper", "HStack", "TypographyExample"]
7
+ }
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var preview_wrapper_exports = {};
20
+ __export(preview_wrapper_exports, {
21
+ default: () => preview_wrapper_default
22
+ });
23
+ module.exports = __toCommonJS(preview_wrapper_exports);
24
+ var import_jsx_runtime = require("react/jsx-runtime");
25
+ var import_components = require("@wordpress/components");
26
+ var import_compose = require("@wordpress/compose");
27
+ var import_element = require("@wordpress/element");
28
+ var import_hooks = require("./hooks");
29
+ const normalizedWidth = 248;
30
+ const normalizedHeight = 152;
31
+ const THROTTLE_OPTIONS = {
32
+ leading: true,
33
+ trailing: true
34
+ };
35
+ function PreviewWrapper({
36
+ children,
37
+ label,
38
+ isFocused,
39
+ withHoverView
40
+ }) {
41
+ const [backgroundColor = "white"] = (0, import_hooks.useStyle)("color.background");
42
+ const [gradientValue] = (0, import_hooks.useStyle)("color.gradient");
43
+ const disableMotion = (0, import_compose.useReducedMotion)();
44
+ const [isHovered, setIsHovered] = (0, import_element.useState)(false);
45
+ const [containerResizeListener, { width }] = (0, import_compose.useResizeObserver)();
46
+ const [throttledWidth, setThrottledWidthState] = (0, import_element.useState)(width);
47
+ const [ratioState, setRatioState] = (0, import_element.useState)();
48
+ const setThrottledWidth = (0, import_compose.useThrottle)(
49
+ setThrottledWidthState,
50
+ 250,
51
+ THROTTLE_OPTIONS
52
+ );
53
+ (0, import_element.useLayoutEffect)(() => {
54
+ if (width) {
55
+ setThrottledWidth(width);
56
+ }
57
+ }, [width, setThrottledWidth]);
58
+ (0, import_element.useLayoutEffect)(() => {
59
+ const newRatio = throttledWidth ? throttledWidth / normalizedWidth : 1;
60
+ const ratioDiff = newRatio - (ratioState || 0);
61
+ const isRatioDiffBigEnough = Math.abs(ratioDiff) > 0.1;
62
+ if (isRatioDiffBigEnough || !ratioState) {
63
+ setRatioState(newRatio);
64
+ }
65
+ }, [throttledWidth, ratioState]);
66
+ const fallbackRatio = width ? width / normalizedWidth : 1;
67
+ const ratio = ratioState ? ratioState : fallbackRatio;
68
+ const isReady = !!width;
69
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
70
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { position: "relative" }, children: containerResizeListener }),
71
+ isReady && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
72
+ "div",
73
+ {
74
+ className: "global-styles-ui-preview__wrapper",
75
+ style: {
76
+ height: normalizedHeight * ratio
77
+ },
78
+ onMouseEnter: () => setIsHovered(true),
79
+ onMouseLeave: () => setIsHovered(false),
80
+ tabIndex: -1,
81
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
82
+ import_components.__unstableMotion.div,
83
+ {
84
+ style: {
85
+ height: normalizedHeight * ratio,
86
+ width: "100%",
87
+ background: gradientValue ?? backgroundColor,
88
+ cursor: withHoverView ? "pointer" : void 0
89
+ },
90
+ initial: "start",
91
+ animate: (isHovered || isFocused) && !disableMotion && label ? "hover" : "start",
92
+ children: [].concat(children).map(
93
+ (child, key) => child({ ratio, key })
94
+ )
95
+ }
96
+ )
97
+ }
98
+ )
99
+ ] });
100
+ }
101
+ var preview_wrapper_default = PreviewWrapper;
102
+ //# sourceMappingURL=preview-wrapper.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/preview-wrapper.tsx"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __unstableMotion as motion } from '@wordpress/components';\nimport {\n\tuseThrottle,\n\tuseReducedMotion,\n\tuseResizeObserver,\n} from '@wordpress/compose';\nimport { useLayoutEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useStyle } from './hooks';\n\nconst normalizedWidth = 248;\nconst normalizedHeight = 152;\n\n// Throttle options for useThrottle. Must be defined outside of the component,\n// so that the object reference is the same on each render.\nconst THROTTLE_OPTIONS = {\n\tleading: true,\n\ttrailing: true,\n};\n\ninterface PreviewWrapperProps {\n\tchildren:\n\t\t| ( ( args: { ratio: number; key: number } ) => React.ReactNode )\n\t\t| ( ( args: { ratio: number; key: number } ) => React.ReactNode )[];\n\tlabel?: string;\n\tisFocused?: boolean;\n\twithHoverView?: boolean;\n}\n\nfunction PreviewWrapper( {\n\tchildren,\n\tlabel,\n\tisFocused,\n\twithHoverView,\n}: PreviewWrapperProps ) {\n\tconst [ backgroundColor = 'white' ] =\n\t\tuseStyle< string >( 'color.background' );\n\tconst [ gradientValue ] = useStyle< string >( 'color.gradient' );\n\tconst disableMotion = useReducedMotion();\n\tconst [ isHovered, setIsHovered ] = useState( false );\n\tconst [ containerResizeListener, { width } ] = useResizeObserver();\n\tconst [ throttledWidth, setThrottledWidthState ] = useState( width );\n\tconst [ ratioState, setRatioState ] = useState< number | undefined >();\n\n\tconst setThrottledWidth = useThrottle(\n\t\tsetThrottledWidthState,\n\t\t250,\n\t\tTHROTTLE_OPTIONS\n\t);\n\n\t// Must use useLayoutEffect to avoid a flash of the container at the wrong\n\t// size before the width is set.\n\tuseLayoutEffect( () => {\n\t\tif ( width ) {\n\t\t\tsetThrottledWidth( width );\n\t\t}\n\t}, [ width, setThrottledWidth ] );\n\n\t// Must use useLayoutEffect to avoid a flash of the container at the wrong\n\t// size before the width is set.\n\tuseLayoutEffect( () => {\n\t\tconst newRatio = throttledWidth ? throttledWidth / normalizedWidth : 1;\n\t\tconst ratioDiff = newRatio - ( ratioState || 0 );\n\n\t\t// Only update the ratio state if the difference is big enough\n\t\t// or if the ratio state is not yet set. This is to avoid an\n\t\t// endless loop of updates at particular viewport heights when the\n\t\t// presence of a scrollbar causes the width to change slightly.\n\t\tconst isRatioDiffBigEnough = Math.abs( ratioDiff ) > 0.1;\n\n\t\tif ( isRatioDiffBigEnough || ! ratioState ) {\n\t\t\tsetRatioState( newRatio );\n\t\t}\n\t}, [ throttledWidth, ratioState ] );\n\n\t// Set a fallbackRatio to use before the throttled ratio has been set.\n\tconst fallbackRatio = width ? width / normalizedWidth : 1;\n\t/*\n\t * Use the throttled ratio if it has been calculated, otherwise\n\t * use the fallback ratio. The throttled ratio is used to avoid\n\t * an endless loop of updates at particular viewport heights.\n\t * See: https://github.com/WordPress/gutenberg/issues/55112\n\t */\n\tconst ratio = ratioState ? ratioState : fallbackRatio;\n\n\tconst isReady = !! width;\n\n\treturn (\n\t\t<>\n\t\t\t<div style={ { position: 'relative' } }>\n\t\t\t\t{ containerResizeListener }\n\t\t\t</div>\n\t\t\t{ isReady && (\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"global-styles-ui-preview__wrapper\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: normalizedHeight * ratio,\n\t\t\t\t\t} }\n\t\t\t\t\tonMouseEnter={ () => setIsHovered( true ) }\n\t\t\t\t\tonMouseLeave={ () => setIsHovered( false ) }\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t>\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: normalizedHeight * ratio,\n\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\tbackground: gradientValue ?? backgroundColor,\n\t\t\t\t\t\t\tcursor: withHoverView ? 'pointer' : undefined,\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tinitial=\"start\"\n\t\t\t\t\t\tanimate={\n\t\t\t\t\t\t\t( isHovered || isFocused ) &&\n\t\t\t\t\t\t\t! disableMotion &&\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t\t? 'hover'\n\t\t\t\t\t\t\t\t: 'start'\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{ []\n\t\t\t\t\t\t\t.concat( children as any ) // This makes sure children is always an array.\n\t\t\t\t\t\t\t.map( ( child: any, key: number ) =>\n\t\t\t\t\t\t\t\tchild( { ratio, key } )\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t</motion.div>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default PreviewWrapper;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA8FE;AA3FF,wBAA2C;AAC3C,qBAIO;AACP,qBAA0C;AAK1C,mBAAyB;AAEzB,MAAM,kBAAkB;AACxB,MAAM,mBAAmB;AAIzB,MAAM,mBAAmB;AAAA,EACxB,SAAS;AAAA,EACT,UAAU;AACX;AAWA,SAAS,eAAgB;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAyB;AACxB,QAAM,CAAE,kBAAkB,OAAQ,QACjC,uBAAoB,kBAAmB;AACxC,QAAM,CAAE,aAAc,QAAI,uBAAoB,gBAAiB;AAC/D,QAAM,oBAAgB,iCAAiB;AACvC,QAAM,CAAE,WAAW,YAAa,QAAI,yBAAU,KAAM;AACpD,QAAM,CAAE,yBAAyB,EAAE,MAAM,CAAE,QAAI,kCAAkB;AACjE,QAAM,CAAE,gBAAgB,sBAAuB,QAAI,yBAAU,KAAM;AACnE,QAAM,CAAE,YAAY,aAAc,QAAI,yBAA+B;AAErE,QAAM,wBAAoB;AAAA,IACzB;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAIA,sCAAiB,MAAM;AACtB,QAAK,OAAQ;AACZ,wBAAmB,KAAM;AAAA,IAC1B;AAAA,EACD,GAAG,CAAE,OAAO,iBAAkB,CAAE;AAIhC,sCAAiB,MAAM;AACtB,UAAM,WAAW,iBAAiB,iBAAiB,kBAAkB;AACrE,UAAM,YAAY,YAAa,cAAc;AAM7C,UAAM,uBAAuB,KAAK,IAAK,SAAU,IAAI;AAErD,QAAK,wBAAwB,CAAE,YAAa;AAC3C,oBAAe,QAAS;AAAA,IACzB;AAAA,EACD,GAAG,CAAE,gBAAgB,UAAW,CAAE;AAGlC,QAAM,gBAAgB,QAAQ,QAAQ,kBAAkB;AAOxD,QAAM,QAAQ,aAAa,aAAa;AAExC,QAAM,UAAU,CAAC,CAAE;AAEnB,SACC,4EACC;AAAA,gDAAC,SAAI,OAAQ,EAAE,UAAU,WAAW,GACjC,mCACH;AAAA,IACE,WACD;AAAA,MAAC;AAAA;AAAA,QACA,WAAU;AAAA,QACV,OAAQ;AAAA,UACP,QAAQ,mBAAmB;AAAA,QAC5B;AAAA,QACA,cAAe,MAAM,aAAc,IAAK;AAAA,QACxC,cAAe,MAAM,aAAc,KAAM;AAAA,QACzC,UAAW;AAAA,QAEX;AAAA,UAAC,kBAAAA,iBAAO;AAAA,UAAP;AAAA,YACA,OAAQ;AAAA,cACP,QAAQ,mBAAmB;AAAA,cAC3B,OAAO;AAAA,cACP,YAAY,iBAAiB;AAAA,cAC7B,QAAQ,gBAAgB,YAAY;AAAA,YACrC;AAAA,YACA,SAAQ;AAAA,YACR,UACG,aAAa,cACf,CAAE,iBACF,QACG,UACA;AAAA,YAGF,WAAC,EACD,OAAQ,QAAgB,EACxB;AAAA,cAAK,CAAE,OAAY,QACnB,MAAO,EAAE,OAAO,IAAI,CAAE;AAAA,YACvB;AAAA;AAAA,QACF;AAAA;AAAA,IACD;AAAA,KAEF;AAEF;AAEA,IAAO,0BAAQ;",
6
+ "names": ["motion"]
7
+ }