@upstart.gg/sdk 0.0.95 → 0.0.97

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 (527) hide show
  1. package/dist/node/cli/api.js +2 -2
  2. package/dist/node/cli/api.js.map +1 -1
  3. package/dist/node/cli/commands/login/cmd-login.js +6 -6
  4. package/dist/node/cli/commands/login/cmd-login.js.map +1 -1
  5. package/dist/node/cli/commands/logout/cmd-logout.js +2 -2
  6. package/dist/node/cli/commands/publish/cmd-publish.d.ts.map +1 -1
  7. package/dist/node/cli/commands/publish/cmd-publish.js +18 -18
  8. package/dist/node/cli/commands/publish/cmd-publish.js.map +1 -1
  9. package/dist/node/cli/commands/publish/uploader.js +7 -7
  10. package/dist/node/cli/commands/publish/uploader.js.map +1 -1
  11. package/dist/node/cli/is-logged-in.js +2 -2
  12. package/dist/node/cli/is-logged-in.js.map +1 -1
  13. package/dist/node/cli/program.js +24 -24
  14. package/dist/node/cli/program.js.map +1 -1
  15. package/dist/node/shared/config.d.ts +4 -14
  16. package/dist/node/shared/config.d.ts.map +1 -1
  17. package/dist/node/shared/config.js +4 -4
  18. package/dist/node/shared/config.js.map +1 -1
  19. package/dist/node/shared/logger.d.ts.map +1 -1
  20. package/dist/node/shared/logger.js +2 -2
  21. package/dist/node/shared/logger.js.map +1 -1
  22. package/dist/shared/ajv.d.ts +2 -0
  23. package/dist/shared/ajv.d.ts.map +1 -1
  24. package/dist/shared/ajv.js +1 -1
  25. package/dist/shared/attributes.d.ts +45 -83
  26. package/dist/shared/attributes.d.ts.map +1 -1
  27. package/dist/shared/attributes.js +1 -1
  28. package/dist/shared/brick-manifest.d.ts +7 -17
  29. package/dist/shared/brick-manifest.d.ts.map +1 -1
  30. package/dist/shared/brick-manifest.js +1 -1
  31. package/dist/shared/bricks/manifests/accordion.manifest.d.ts +111 -0
  32. package/dist/shared/bricks/manifests/accordion.manifest.d.ts.map +1 -0
  33. package/dist/shared/bricks/manifests/accordion.manifest.js +3 -0
  34. package/dist/shared/bricks/manifests/all-manifests.d.ts +5 -0
  35. package/dist/shared/bricks/manifests/all-manifests.d.ts.map +1 -1
  36. package/dist/shared/bricks/manifests/all-manifests.js +1 -1
  37. package/dist/shared/bricks/manifests/button.manifest.d.ts +22 -13
  38. package/dist/shared/bricks/manifests/button.manifest.d.ts.map +1 -1
  39. package/dist/shared/bricks/manifests/button.manifest.js +1 -1
  40. package/dist/shared/bricks/manifests/card.manifest.d.ts +44 -54
  41. package/dist/shared/bricks/manifests/card.manifest.d.ts.map +1 -1
  42. package/dist/shared/bricks/manifests/card.manifest.js +1 -1
  43. package/dist/shared/bricks/manifests/carousel.manifest.d.ts +39 -12
  44. package/dist/shared/bricks/manifests/carousel.manifest.d.ts.map +1 -1
  45. package/dist/shared/bricks/manifests/carousel.manifest.js +1 -1
  46. package/dist/shared/bricks/manifests/container.manifest.d.ts +49 -172
  47. package/dist/shared/bricks/manifests/container.manifest.d.ts.map +1 -1
  48. package/dist/shared/bricks/manifests/container.manifest.js +1 -1
  49. package/dist/shared/bricks/manifests/divider.manifest.d.ts +63 -0
  50. package/dist/shared/bricks/manifests/divider.manifest.d.ts.map +1 -0
  51. package/dist/shared/bricks/manifests/divider.manifest.js +3 -0
  52. package/dist/shared/bricks/manifests/footer.manifest.d.ts +30 -35
  53. package/dist/shared/bricks/manifests/footer.manifest.d.ts.map +1 -1
  54. package/dist/shared/bricks/manifests/footer.manifest.js +1 -1
  55. package/dist/shared/bricks/manifests/form.manifest.d.ts +22 -12
  56. package/dist/shared/bricks/manifests/form.manifest.d.ts.map +1 -1
  57. package/dist/shared/bricks/manifests/form.manifest.js +1 -1
  58. package/dist/shared/bricks/manifests/hero.manifest.d.ts +31 -71
  59. package/dist/shared/bricks/manifests/hero.manifest.d.ts.map +1 -1
  60. package/dist/shared/bricks/manifests/hero.manifest.js +1 -1
  61. package/dist/shared/bricks/manifests/icon.manifest.d.ts +18 -12
  62. package/dist/shared/bricks/manifests/icon.manifest.d.ts.map +1 -1
  63. package/dist/shared/bricks/manifests/icon.manifest.js +1 -1
  64. package/dist/shared/bricks/manifests/image.manifest.d.ts +36 -50
  65. package/dist/shared/bricks/manifests/image.manifest.d.ts.map +1 -1
  66. package/dist/shared/bricks/manifests/image.manifest.js +1 -1
  67. package/dist/shared/bricks/manifests/images-gallery.manifest.d.ts +55 -115
  68. package/dist/shared/bricks/manifests/images-gallery.manifest.d.ts.map +1 -1
  69. package/dist/shared/bricks/manifests/images-gallery.manifest.js +1 -1
  70. package/dist/shared/bricks/manifests/map.manifest.d.ts +36 -12
  71. package/dist/shared/bricks/manifests/map.manifest.d.ts.map +1 -1
  72. package/dist/shared/bricks/manifests/map.manifest.js +1 -1
  73. package/dist/shared/bricks/manifests/navbar.manifest.d.ts +160 -0
  74. package/dist/shared/bricks/manifests/navbar.manifest.d.ts.map +1 -0
  75. package/dist/shared/bricks/manifests/navbar.manifest.js +3 -0
  76. package/dist/shared/bricks/manifests/sidebar.manifest.d.ts +83 -12
  77. package/dist/shared/bricks/manifests/sidebar.manifest.d.ts.map +1 -1
  78. package/dist/shared/bricks/manifests/sidebar.manifest.js +1 -1
  79. package/dist/shared/bricks/manifests/social-links.manifest.d.ts +37 -12
  80. package/dist/shared/bricks/manifests/social-links.manifest.d.ts.map +1 -1
  81. package/dist/shared/bricks/manifests/social-links.manifest.js +1 -1
  82. package/dist/shared/bricks/manifests/testimonials.manifest.d.ts +94 -0
  83. package/dist/shared/bricks/manifests/testimonials.manifest.d.ts.map +1 -0
  84. package/dist/shared/bricks/manifests/testimonials.manifest.js +3 -0
  85. package/dist/shared/bricks/manifests/text.manifest.d.ts +31 -63
  86. package/dist/shared/bricks/manifests/text.manifest.d.ts.map +1 -1
  87. package/dist/shared/bricks/manifests/text.manifest.js +1 -1
  88. package/dist/shared/bricks/manifests/timeline.manifest.d.ts +122 -0
  89. package/dist/shared/bricks/manifests/timeline.manifest.d.ts.map +1 -0
  90. package/dist/shared/bricks/manifests/timeline.manifest.js +3 -0
  91. package/dist/shared/bricks/manifests/video.manifest.d.ts +38 -12
  92. package/dist/shared/bricks/manifests/video.manifest.d.ts.map +1 -1
  93. package/dist/shared/bricks/manifests/video.manifest.js +1 -1
  94. package/dist/shared/bricks/props/_style-presets.d.ts +1 -1
  95. package/dist/shared/bricks/props/_style-presets.d.ts.map +1 -1
  96. package/dist/shared/bricks/props/_style-presets.js +1 -1
  97. package/dist/shared/bricks/props/align.d.ts +7 -3
  98. package/dist/shared/bricks/props/align.d.ts.map +1 -1
  99. package/dist/shared/bricks/props/align.js +1 -1
  100. package/dist/shared/bricks/props/background.d.ts +8 -1
  101. package/dist/shared/bricks/props/background.d.ts.map +1 -1
  102. package/dist/shared/bricks/props/background.js +1 -1
  103. package/dist/shared/bricks/props/boolean.js +1 -1
  104. package/dist/shared/bricks/props/border.d.ts +24 -22
  105. package/dist/shared/bricks/props/border.d.ts.map +1 -1
  106. package/dist/shared/bricks/props/border.js +1 -1
  107. package/dist/shared/bricks/props/color.d.ts +5 -0
  108. package/dist/shared/bricks/props/color.d.ts.map +1 -0
  109. package/dist/shared/bricks/props/color.js +3 -0
  110. package/dist/shared/bricks/props/common.d.ts +9 -1
  111. package/dist/shared/bricks/props/common.d.ts.map +1 -1
  112. package/dist/shared/bricks/props/common.js +1 -1
  113. package/dist/shared/bricks/props/container.d.ts +37 -45
  114. package/dist/shared/bricks/props/container.d.ts.map +1 -1
  115. package/dist/shared/bricks/props/container.js +1 -1
  116. package/dist/shared/bricks/props/css-length.d.ts +5 -0
  117. package/dist/shared/bricks/props/css-length.d.ts.map +1 -0
  118. package/dist/shared/bricks/props/css-length.js +3 -0
  119. package/dist/shared/bricks/props/datasource.d.ts +9 -13
  120. package/dist/shared/bricks/props/datasource.d.ts.map +1 -1
  121. package/dist/shared/bricks/props/datasource.js +1 -1
  122. package/dist/shared/bricks/props/date.d.ts +4 -0
  123. package/dist/shared/bricks/props/date.d.ts.map +1 -0
  124. package/dist/shared/bricks/props/date.js +3 -0
  125. package/dist/shared/bricks/props/effects.d.ts +4 -21
  126. package/dist/shared/bricks/props/effects.d.ts.map +1 -1
  127. package/dist/shared/bricks/props/effects.js +1 -1
  128. package/dist/shared/bricks/props/enum.d.ts +13 -0
  129. package/dist/shared/bricks/props/enum.d.ts.map +1 -0
  130. package/dist/shared/bricks/props/enum.js +3 -0
  131. package/dist/shared/bricks/props/file.d.ts +2 -0
  132. package/dist/shared/bricks/props/file.d.ts.map +1 -0
  133. package/dist/shared/bricks/props/file.js +3 -0
  134. package/dist/shared/bricks/props/geolocation.d.ts +16 -0
  135. package/dist/shared/bricks/props/geolocation.d.ts.map +1 -0
  136. package/dist/shared/bricks/props/geolocation.js +3 -0
  137. package/dist/shared/bricks/props/helpers.d.ts +8 -4
  138. package/dist/shared/bricks/props/helpers.d.ts.map +1 -1
  139. package/dist/shared/bricks/props/helpers.js +1 -1
  140. package/dist/shared/bricks/props/image.d.ts +7 -1
  141. package/dist/shared/bricks/props/image.d.ts.map +1 -1
  142. package/dist/shared/bricks/props/image.js +1 -1
  143. package/dist/shared/bricks/props/number.js +1 -1
  144. package/dist/shared/bricks/props/padding.d.ts +2 -1
  145. package/dist/shared/bricks/props/padding.d.ts.map +1 -1
  146. package/dist/shared/bricks/props/padding.js +1 -1
  147. package/dist/shared/bricks/props/position.d.ts.map +1 -1
  148. package/dist/shared/bricks/props/position.js +1 -1
  149. package/dist/shared/bricks/props/preset.d.ts +92 -0
  150. package/dist/shared/bricks/props/preset.d.ts.map +1 -0
  151. package/dist/shared/bricks/props/preset.js +3 -0
  152. package/dist/shared/bricks/props/string.d.ts +8 -3
  153. package/dist/shared/bricks/props/string.d.ts.map +1 -1
  154. package/dist/shared/bricks/props/string.js +1 -1
  155. package/dist/shared/bricks/props/text.d.ts +3 -4
  156. package/dist/shared/bricks/props/text.d.ts.map +1 -1
  157. package/dist/shared/bricks/props/text.js +1 -1
  158. package/dist/shared/bricks/props/types.d.ts +5 -2
  159. package/dist/shared/bricks/props/types.d.ts.map +1 -1
  160. package/dist/shared/bricks.d.ts +243 -134
  161. package/dist/shared/bricks.d.ts.map +1 -1
  162. package/dist/shared/bricks.js +1 -1
  163. package/dist/shared/chunk-2AJYHJFG.js +8 -0
  164. package/dist/shared/chunk-2FHWS73Y.js +6 -0
  165. package/dist/shared/chunk-3FJVF357.js +3 -0
  166. package/dist/shared/chunk-3RHYJ6E7.js +5 -0
  167. package/dist/shared/chunk-3VZACK2Y.js +3 -0
  168. package/dist/shared/chunk-3XCKZ4JQ.js +3 -0
  169. package/dist/shared/chunk-4MPRHJWO.js +3 -0
  170. package/dist/shared/chunk-5EOWW7BX.js +4 -0
  171. package/dist/shared/chunk-5HYPCOSS.js +3 -0
  172. package/dist/shared/chunk-5K5C6XFX.js +3 -0
  173. package/dist/shared/chunk-6QS5PKLA.js +3 -0
  174. package/dist/shared/chunk-74EL657O.js +3 -0
  175. package/dist/shared/chunk-AJDYOLKP.js +3 -0
  176. package/dist/shared/chunk-ALFOZHAH.js +3 -0
  177. package/dist/shared/{chunk-FGU4BGP4.js → chunk-ATDJCXC2.js} +1 -1
  178. package/dist/shared/chunk-BJSO43AS.js +3 -0
  179. package/dist/shared/chunk-BTKLQQZA.js +3 -0
  180. package/dist/shared/chunk-CAVNF3BU.js +3 -0
  181. package/dist/shared/chunk-CCNU3J56.js +3 -0
  182. package/dist/shared/chunk-CTRS76PX.js +3 -0
  183. package/dist/shared/chunk-DCH2FI6T.js +8 -0
  184. package/dist/shared/chunk-DFSQR6QC.js +3 -0
  185. package/dist/shared/chunk-ENU4SEHO.js +3 -0
  186. package/dist/shared/chunk-G7LX3UKQ.js +3 -0
  187. package/dist/shared/chunk-GGJBTPGW.js +3 -0
  188. package/dist/shared/chunk-H24R3IWA.js +3 -0
  189. package/dist/shared/chunk-HYVQXAK5.js +3 -0
  190. package/dist/shared/chunk-LKVQQQTI.js +3 -0
  191. package/dist/shared/chunk-MITJPRGD.js +6 -0
  192. package/dist/shared/chunk-NLZBY65T.js +3 -0
  193. package/dist/shared/chunk-OUI2VDNM.js +3 -0
  194. package/dist/shared/chunk-OYIL5SCU.js +3 -0
  195. package/dist/shared/chunk-P5DZK4TS.js +3 -0
  196. package/dist/shared/chunk-PK3R5VOF.js +3 -0
  197. package/dist/shared/chunk-QPATZM3I.js +3 -0
  198. package/dist/shared/chunk-RDBEWW4G.js +7 -0
  199. package/dist/shared/chunk-RPBQZW5I.js +3 -0
  200. package/dist/shared/chunk-SLSIAUYV.js +3 -0
  201. package/dist/shared/chunk-SUG225LF.js +3 -0
  202. package/dist/shared/chunk-U5XOIYSS.js +3 -0
  203. package/dist/shared/{chunk-HIZPJNEM.js → chunk-UL7L3HYV.js} +1 -1
  204. package/dist/shared/chunk-V6BCYHZH.js +3 -0
  205. package/dist/shared/chunk-VA5LFJVE.js +3 -0
  206. package/dist/shared/chunk-VAC73HJE.js +3 -0
  207. package/dist/shared/chunk-VBWC36L2.js +3 -0
  208. package/dist/shared/chunk-VLGLD6GR.js +3 -0
  209. package/dist/shared/chunk-VTFWVTPI.js +3 -0
  210. package/dist/shared/chunk-WAAKB6OB.js +3 -0
  211. package/dist/shared/chunk-Y36SM2AO.js +3 -0
  212. package/dist/shared/chunk-Y7CEEEVW.js +3 -0
  213. package/dist/shared/chunk-YZ5Y4WE6.js +3 -0
  214. package/dist/shared/chunk-Z7SYP6FG.js +3 -0
  215. package/dist/shared/chunk-ZJNA4QQC.js +3 -0
  216. package/dist/shared/chunk-ZMDHKAWL.js +3 -0
  217. package/dist/shared/context.d.ts +38 -0
  218. package/dist/shared/context.d.ts.map +1 -0
  219. package/dist/shared/{chunk-WJ5CDDXW.js → context.js} +0 -1
  220. package/dist/shared/datarecords/types.d.ts +40 -20
  221. package/dist/shared/datarecords/types.d.ts.map +1 -1
  222. package/dist/shared/datarecords/types.js +1 -1
  223. package/dist/shared/datasources/external/http-json/fetcher.d.ts.map +1 -0
  224. package/dist/shared/datasources/external/http-json/options.d.ts.map +1 -0
  225. package/dist/shared/datasources/external/{json → http-json}/schema.d.ts +0 -1
  226. package/dist/shared/datasources/external/http-json/schema.d.ts.map +1 -0
  227. package/dist/shared/datasources/external/http-json/tests/fetcher.test.d.ts.map +1 -0
  228. package/dist/shared/datasources/external/rss/fetcher.d.ts.map +1 -1
  229. package/dist/shared/datasources/external/rss/sample.d.ts.map +1 -1
  230. package/dist/shared/datasources/external/rss/schema.d.ts +7 -13
  231. package/dist/shared/datasources/external/rss/schema.d.ts.map +1 -1
  232. package/dist/shared/datasources/external/youtube/list/sample.d.ts +23 -32
  233. package/dist/shared/datasources/external/youtube/list/sample.d.ts.map +1 -1
  234. package/dist/shared/datasources/external/youtube/list/schema.d.ts +24 -33
  235. package/dist/shared/datasources/external/youtube/list/schema.d.ts.map +1 -1
  236. package/dist/shared/datasources/internal/blog/schema.d.ts.map +1 -1
  237. package/dist/shared/datasources/internal/changelog/schema.d.ts.map +1 -1
  238. package/dist/shared/datasources/internal/recipes/schema.d.ts.map +1 -1
  239. package/dist/shared/datasources/samples.d.ts +1 -1
  240. package/dist/shared/datasources/samples.d.ts.map +1 -1
  241. package/dist/shared/datasources/schemas.d.ts +33 -583
  242. package/dist/shared/datasources/schemas.d.ts.map +1 -1
  243. package/dist/shared/datasources/schemas.js +1 -1
  244. package/dist/shared/datasources/types.d.ts +75 -1314
  245. package/dist/shared/datasources/types.d.ts.map +1 -1
  246. package/dist/shared/datasources/types.js +1 -1
  247. package/dist/shared/datasources.d.ts +14 -0
  248. package/dist/shared/datasources.d.ts.map +1 -1
  249. package/dist/shared/datasources.js +1 -1
  250. package/dist/shared/images.d.ts +30 -0
  251. package/dist/shared/images.d.ts.map +1 -0
  252. package/dist/shared/images.js +3 -0
  253. package/dist/shared/layout-constants.js +1 -1
  254. package/dist/shared/page.d.ts +110 -2676
  255. package/dist/shared/page.d.ts.map +1 -1
  256. package/dist/shared/page.js +1 -1
  257. package/dist/shared/prompt.d.ts +4 -0
  258. package/dist/shared/prompt.d.ts.map +1 -0
  259. package/dist/shared/prompt.js +3 -0
  260. package/dist/shared/responsive.d.ts +3 -3
  261. package/dist/shared/responsive.d.ts.map +1 -1
  262. package/dist/shared/responsive.js +1 -1
  263. package/dist/shared/site.d.ts +545 -0
  264. package/dist/shared/site.d.ts.map +1 -0
  265. package/dist/shared/site.js +3 -0
  266. package/dist/shared/sitemap.d.ts +38 -0
  267. package/dist/shared/sitemap.d.ts.map +1 -0
  268. package/dist/shared/sitemap.js +3 -0
  269. package/dist/shared/theme.d.ts +41 -19
  270. package/dist/shared/theme.d.ts.map +1 -1
  271. package/dist/shared/theme.js +1 -1
  272. package/dist/shared/themes/color-system.d.ts +5 -309
  273. package/dist/shared/themes/color-system.d.ts.map +1 -1
  274. package/dist/shared/themes/color-system.js +1 -1
  275. package/dist/shared/utils/invariant.js +1 -1
  276. package/dist/shared/utils/schema.d.ts +10 -1
  277. package/dist/shared/utils/schema.d.ts.map +1 -1
  278. package/dist/shared/utils/schema.js +1 -1
  279. package/dist/shared/utils/typed-ref.d.ts +32 -0
  280. package/dist/shared/utils/typed-ref.d.ts.map +1 -0
  281. package/dist/shared/utils/typed-ref.js +3 -0
  282. package/package.json +12 -12
  283. package/src/node/cli/api.ts +101 -0
  284. package/src/node/cli/commands/cmd-build.ts +64 -0
  285. package/src/node/cli/commands/login/cmd-login.ts +111 -0
  286. package/src/node/cli/commands/logout/cmd-logout.ts +11 -0
  287. package/src/node/cli/commands/publish/cmd-publish.ts +135 -0
  288. package/src/node/cli/commands/publish/parse-gitignore.ts +278 -0
  289. package/src/node/cli/commands/publish/uploader.ts +333 -0
  290. package/src/node/cli/constants.ts +14 -0
  291. package/src/node/cli/is-logged-in.ts +28 -0
  292. package/src/node/cli/program.ts +77 -0
  293. package/src/node/cli/store.ts +64 -0
  294. package/src/node/cli/tests/api.test.ts +161 -0
  295. package/src/node/cli/types.ts +34 -0
  296. package/src/node/cli/utils.ts +20 -0
  297. package/src/node/shared/config.ts +69 -0
  298. package/src/node/shared/logger.ts +44 -0
  299. package/src/shared/ajv.ts +111 -0
  300. package/src/shared/analytics/init.ts +14 -0
  301. package/src/shared/analytics/track.ts +21 -0
  302. package/src/shared/analytics/types.ts +13 -0
  303. package/src/shared/attributes.ts +222 -0
  304. package/src/shared/brick-manifest.ts +110 -0
  305. package/src/shared/bricks/manifests/accordion.manifest.ts +179 -0
  306. package/src/shared/bricks/manifests/all-manifests.ts +92 -0
  307. package/src/shared/bricks/manifests/button.manifest.ts +145 -0
  308. package/src/shared/bricks/manifests/card.manifest.ts +269 -0
  309. package/src/shared/bricks/manifests/carousel.manifest.ts +106 -0
  310. package/src/shared/bricks/manifests/container.manifest.ts +357 -0
  311. package/src/shared/bricks/manifests/divider.manifest.ts +121 -0
  312. package/src/shared/bricks/manifests/footer.manifest.ts +487 -0
  313. package/src/shared/bricks/manifests/form.manifest.ts +112 -0
  314. package/src/shared/bricks/manifests/hero.manifest.ts +132 -0
  315. package/src/shared/bricks/manifests/icon.manifest.ts +130 -0
  316. package/src/shared/bricks/manifests/image.manifest.ts +203 -0
  317. package/src/shared/bricks/manifests/images-gallery.manifest.ts +227 -0
  318. package/src/shared/bricks/manifests/map.manifest.ts +75 -0
  319. package/src/shared/bricks/manifests/navbar.manifest.ts +344 -0
  320. package/src/shared/bricks/manifests/sidebar.manifest.ts +90 -0
  321. package/src/shared/bricks/manifests/social-links.manifest.ts +370 -0
  322. package/src/shared/bricks/manifests/testimonials.manifest.ts +397 -0
  323. package/src/shared/bricks/manifests/tests/header.manifest.test.ts +10 -0
  324. package/src/shared/bricks/manifests/text.manifest.ts +164 -0
  325. package/src/shared/bricks/manifests/timeline.manifest.ts +456 -0
  326. package/src/shared/bricks/manifests/video.manifest.ts +59 -0
  327. package/src/shared/bricks/props/_style-presets.ts +352 -0
  328. package/src/shared/bricks/props/align.ts +59 -0
  329. package/src/shared/bricks/props/background.ts +118 -0
  330. package/src/shared/bricks/props/boolean.ts +11 -0
  331. package/src/shared/bricks/props/border.ts +84 -0
  332. package/src/shared/bricks/props/color.ts +24 -0
  333. package/src/shared/bricks/props/common.ts +37 -0
  334. package/src/shared/bricks/props/container.ts +356 -0
  335. package/src/shared/bricks/props/css-length.ts +25 -0
  336. package/src/shared/bricks/props/datasource.ts +60 -0
  337. package/src/shared/bricks/props/date.ts +24 -0
  338. package/src/shared/bricks/props/effects.ts +123 -0
  339. package/src/shared/bricks/props/enum.ts +42 -0
  340. package/src/shared/bricks/props/file.ts +12 -0
  341. package/src/shared/bricks/props/geolocation.ts +30 -0
  342. package/src/shared/bricks/props/helpers.ts +101 -0
  343. package/src/shared/bricks/props/image.ts +90 -0
  344. package/src/shared/bricks/props/number.ts +16 -0
  345. package/src/shared/bricks/props/padding.ts +21 -0
  346. package/src/shared/bricks/props/position.ts +27 -0
  347. package/src/shared/bricks/props/preset.ts +136 -0
  348. package/src/shared/bricks/props/string.ts +60 -0
  349. package/src/shared/bricks/props/tests/align.test.ts +37 -0
  350. package/src/shared/bricks/props/tests/background.test.ts +102 -0
  351. package/src/shared/bricks/props/tests/border.test.ts +38 -0
  352. package/src/shared/bricks/props/tests/effects.test.ts +37 -0
  353. package/src/shared/bricks/props/tests/helpers.test.ts +133 -0
  354. package/src/shared/bricks/props/tests/image.test.ts +71 -0
  355. package/src/shared/bricks/props/tests/padding.ts +12 -0
  356. package/src/shared/bricks/props/tests/string.test.ts +79 -0
  357. package/src/shared/bricks/props/text.ts +66 -0
  358. package/src/shared/bricks/props/types.ts +57 -0
  359. package/src/shared/bricks.ts +232 -0
  360. package/src/shared/context.ts +39 -0
  361. package/src/shared/datarecords/external/airtable/handler.ts +21 -0
  362. package/src/shared/datarecords/external/airtable/options.ts +22 -0
  363. package/src/shared/datarecords/external/generic-webhook/handler.ts +10 -0
  364. package/src/shared/datarecords/external/generic-webhook/options.ts +13 -0
  365. package/src/shared/datarecords/external/google/oauth/config.ts +30 -0
  366. package/src/shared/datarecords/external/google/sheets/handler.ts +26 -0
  367. package/src/shared/datarecords/external/google/sheets/options.ts +9 -0
  368. package/src/shared/datarecords/types.ts +120 -0
  369. package/src/shared/datarecords.ts +5 -0
  370. package/src/shared/datasources/README.md +3 -0
  371. package/src/shared/datasources/external/facebook/posts/fetcher.ts +62 -0
  372. package/src/shared/datasources/external/facebook/posts/sample.ts +35 -0
  373. package/src/shared/datasources/external/facebook/posts/schema.ts +33 -0
  374. package/src/shared/datasources/external/facebook/posts/tests/fetcher.test.ts +91 -0
  375. package/src/shared/datasources/external/http-json/fetcher.ts +28 -0
  376. package/src/shared/datasources/external/http-json/options.ts +12 -0
  377. package/src/shared/datasources/external/http-json/schema.ts +6 -0
  378. package/src/shared/datasources/external/http-json/tests/fetcher.test.ts +70 -0
  379. package/src/shared/datasources/external/instagram/feed/fetcher.ts +43 -0
  380. package/src/shared/datasources/external/instagram/feed/sample.ts +22 -0
  381. package/src/shared/datasources/external/instagram/feed/schema.ts +23 -0
  382. package/src/shared/datasources/external/instagram/feed/tests/fetcher.test.ts +82 -0
  383. package/src/shared/datasources/external/mastodon/account/fetcher.ts +33 -0
  384. package/src/shared/datasources/external/mastodon/account/sample.ts +33 -0
  385. package/src/shared/datasources/external/mastodon/account/schema.ts +45 -0
  386. package/src/shared/datasources/external/mastodon/account/tests/fetcher.test.ts +65 -0
  387. package/src/shared/datasources/external/mastodon/options.ts +11 -0
  388. package/src/shared/datasources/external/mastodon/status/fetcher.ts +45 -0
  389. package/src/shared/datasources/external/mastodon/status/sample.array.ts +59 -0
  390. package/src/shared/datasources/external/mastodon/status/sample.single.ts +55 -0
  391. package/src/shared/datasources/external/mastodon/status/schema.ts +130 -0
  392. package/src/shared/datasources/external/mastodon/status/tests/fetcher.test.ts +74 -0
  393. package/src/shared/datasources/external/meta/oauth/config.ts +16 -0
  394. package/src/shared/datasources/external/meta/options.ts +11 -0
  395. package/src/shared/datasources/external/rss/fetcher.ts +30 -0
  396. package/src/shared/datasources/external/rss/options.ts +11 -0
  397. package/src/shared/datasources/external/rss/sample.ts +22 -0
  398. package/src/shared/datasources/external/rss/schema.ts +42 -0
  399. package/src/shared/datasources/external/threads/media/fetcher.ts +63 -0
  400. package/src/shared/datasources/external/threads/media/sample.ts +44 -0
  401. package/src/shared/datasources/external/threads/media/schema.ts +37 -0
  402. package/src/shared/datasources/external/tiktok/oauth/config.ts +17 -0
  403. package/src/shared/datasources/external/tiktok/video/fetcher.ts +49 -0
  404. package/src/shared/datasources/external/tiktok/video/options.ts +12 -0
  405. package/src/shared/datasources/external/tiktok/video/sample.ts +26 -0
  406. package/src/shared/datasources/external/tiktok/video/schema.ts +27 -0
  407. package/src/shared/datasources/external/youtube/list/fetcher.ts +46 -0
  408. package/src/shared/datasources/external/youtube/list/options.ts +15 -0
  409. package/src/shared/datasources/external/youtube/list/sample.ts +33 -0
  410. package/src/shared/datasources/external/youtube/list/schema.ts +38 -0
  411. package/src/shared/datasources/external/youtube/oauth/config.ts +15 -0
  412. package/src/shared/datasources/fetcher.ts +17 -0
  413. package/src/shared/datasources/internal/blog/schema.ts +69 -0
  414. package/src/shared/datasources/internal/changelog/schema.ts +48 -0
  415. package/src/shared/datasources/internal/contact-info/schema.ts +20 -0
  416. package/src/shared/datasources/internal/cv/schema.ts +217 -0
  417. package/src/shared/datasources/internal/faq/schema.ts +27 -0
  418. package/src/shared/datasources/internal/job-board/schema.ts +228 -0
  419. package/src/shared/datasources/internal/links/schema.ts +15 -0
  420. package/src/shared/datasources/internal/recipes/schema.ts +42 -0
  421. package/src/shared/datasources/internal/restaurant/schema.ts +225 -0
  422. package/src/shared/datasources/provider-options.ts +7 -0
  423. package/src/shared/datasources/samples.ts +26 -0
  424. package/src/shared/datasources/schemas.ts +45 -0
  425. package/src/shared/datasources/types.ts +276 -0
  426. package/src/shared/datasources/utils.ts +16 -0
  427. package/src/shared/datasources.ts +42 -0
  428. package/src/shared/env.ts +23 -0
  429. package/src/shared/errors.ts +1 -0
  430. package/src/shared/images.ts +44 -0
  431. package/src/shared/index.ts +3 -0
  432. package/src/shared/layout-constants.ts +25 -0
  433. package/src/shared/manifest.ts +50 -0
  434. package/src/shared/oauth.ts +16 -0
  435. package/src/shared/page.ts +61 -0
  436. package/src/shared/prompt.ts +9 -0
  437. package/src/shared/responsive.ts +5 -0
  438. package/src/shared/site.ts +97 -0
  439. package/src/shared/sitemap.ts +66 -0
  440. package/src/shared/social-icons.ts +307 -0
  441. package/src/shared/tests/attributes.test.ts +37 -0
  442. package/src/shared/theme.ts +245 -0
  443. package/src/shared/themes/README.md +34 -0
  444. package/src/shared/themes/color-system.ts +127 -0
  445. package/src/shared/utils/canvas-data-uri.ts +2 -0
  446. package/src/shared/utils/invariant.ts +25 -0
  447. package/src/shared/utils/json-date.ts +8 -0
  448. package/src/shared/utils/merge.ts +12 -0
  449. package/src/shared/utils/object-hash.ts +7 -0
  450. package/src/shared/utils/schema.ts +30 -0
  451. package/src/shared/utils/try-catch.ts +12 -0
  452. package/src/shared/utils/typed-ref.ts +41 -0
  453. package/dist/shared/bricks/manifests/countdown.manifest.d.ts +0 -57
  454. package/dist/shared/bricks/manifests/countdown.manifest.d.ts.map +0 -1
  455. package/dist/shared/bricks/manifests/countdown.manifest.js +0 -3
  456. package/dist/shared/bricks/manifests/generic-component.manifest.d.ts +0 -62
  457. package/dist/shared/bricks/manifests/generic-component.manifest.d.ts.map +0 -1
  458. package/dist/shared/bricks/manifests/generic-component.manifest.js +0 -3
  459. package/dist/shared/bricks/manifests/header.manifest.d.ts +0 -275
  460. package/dist/shared/bricks/manifests/header.manifest.d.ts.map +0 -1
  461. package/dist/shared/bricks/manifests/header.manifest.js +0 -3
  462. package/dist/shared/bricks/props/_docs-common-styles.d.ts +0 -59
  463. package/dist/shared/bricks/props/_docs-common-styles.d.ts.map +0 -1
  464. package/dist/shared/bricks/props/_docs-common-styles.js +0 -3
  465. package/dist/shared/bricks/props/tests/container.test.d.ts +0 -2
  466. package/dist/shared/bricks/props/tests/container.test.d.ts.map +0 -1
  467. package/dist/shared/chunk-2ZPY4LCA.js +0 -3
  468. package/dist/shared/chunk-3CY6AZG7.js +0 -3
  469. package/dist/shared/chunk-4FLI7C3B.js +0 -3
  470. package/dist/shared/chunk-64II435T.js +0 -3
  471. package/dist/shared/chunk-6LDLGZUM.js +0 -3
  472. package/dist/shared/chunk-6MEWEGNA.js +0 -3
  473. package/dist/shared/chunk-AZ63RF3K.js +0 -3
  474. package/dist/shared/chunk-BK6LBWDI.js +0 -3
  475. package/dist/shared/chunk-BMDB2V7J.js +0 -3
  476. package/dist/shared/chunk-BXEKJXEP.js +0 -3
  477. package/dist/shared/chunk-DAPQ4JPP.js +0 -3
  478. package/dist/shared/chunk-ERSFH7XA.js +0 -3
  479. package/dist/shared/chunk-F2ZVIFHO.js +0 -3
  480. package/dist/shared/chunk-H6L4KRCJ.js +0 -3
  481. package/dist/shared/chunk-IKAMZM4I.js +0 -3
  482. package/dist/shared/chunk-IWSVY2VC.js +0 -3
  483. package/dist/shared/chunk-JVDUEZYO.js +0 -3
  484. package/dist/shared/chunk-KB4HY432.js +0 -3
  485. package/dist/shared/chunk-LDOM2LJF.js +0 -3
  486. package/dist/shared/chunk-P5FVZ5PL.js +0 -3
  487. package/dist/shared/chunk-PD7P5KSV.js +0 -3
  488. package/dist/shared/chunk-PJ6HA55L.js +0 -3
  489. package/dist/shared/chunk-PSSJMWGU.js +0 -3
  490. package/dist/shared/chunk-Q4MXTCE4.js +0 -8
  491. package/dist/shared/chunk-QCQH5WLN.js +0 -3
  492. package/dist/shared/chunk-RBYYMUOZ.js +0 -3
  493. package/dist/shared/chunk-RHRJYPU3.js +0 -3
  494. package/dist/shared/chunk-S64XUCWM.js +0 -3
  495. package/dist/shared/chunk-SO5M7CYA.js +0 -3
  496. package/dist/shared/chunk-SQVL4WSX.js +0 -3
  497. package/dist/shared/chunk-SWGSHUTE.js +0 -3
  498. package/dist/shared/chunk-U44NTSIO.js +0 -3
  499. package/dist/shared/chunk-U4R5EGBK.js +0 -3
  500. package/dist/shared/chunk-U5WW6K7W.js +0 -3
  501. package/dist/shared/chunk-V2NS45PF.js +0 -3
  502. package/dist/shared/chunk-WOEBR25A.js +0 -3
  503. package/dist/shared/chunk-WPTVLIYS.js +0 -3
  504. package/dist/shared/chunk-WXKRIUTA.js +0 -3
  505. package/dist/shared/chunk-XBX6II3M.js +0 -3
  506. package/dist/shared/chunk-XGCBIXOO.js +0 -3
  507. package/dist/shared/chunk-YY6DANZF.js +0 -3
  508. package/dist/shared/chunk-ZWQHIQEQ.js +0 -3
  509. package/dist/shared/datasources/external/json/fetcher.d.ts.map +0 -1
  510. package/dist/shared/datasources/external/json/options.d.ts.map +0 -1
  511. package/dist/shared/datasources/external/json/schema.d.ts.map +0 -1
  512. package/dist/shared/datasources/external/json/tests/fetcher.test.d.ts.map +0 -1
  513. package/dist/shared/datasources/external/rss/tests/fetcher.test.d.ts +0 -2
  514. package/dist/shared/datasources/external/rss/tests/fetcher.test.d.ts.map +0 -1
  515. package/dist/shared/template.d.ts +0 -898
  516. package/dist/shared/template.d.ts.map +0 -1
  517. package/dist/shared/template.js +0 -3
  518. package/dist/shared/tests/page.test.d.ts +0 -2
  519. package/dist/shared/tests/page.test.d.ts.map +0 -1
  520. package/dist/shared/tests/test-config.d.ts +0 -3
  521. package/dist/shared/tests/test-config.d.ts.map +0 -1
  522. package/dist/shared/themes/all-themes.d.ts +0 -3
  523. package/dist/shared/themes/all-themes.d.ts.map +0 -1
  524. package/dist/shared/themes/all-themes.js +0 -3
  525. /package/dist/shared/datasources/external/{json → http-json}/fetcher.d.ts +0 -0
  526. /package/dist/shared/datasources/external/{json → http-json}/options.d.ts +0 -0
  527. /package/dist/shared/datasources/external/{json → http-json}/tests/fetcher.test.d.ts +0 -0
@@ -0,0 +1,38 @@
1
+ import { type Static } from "@sinclair/typebox";
2
+ export declare const pageInfoSchema: import("@sinclair/typebox").TObject<{
3
+ id: import("@sinclair/typebox").TString;
4
+ label: import("@sinclair/typebox").TString;
5
+ path: import("@sinclair/typebox").TString;
6
+ }>;
7
+ export type PageInfo = Static<typeof pageInfoSchema>;
8
+ export declare const sectionsPlanSchema: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
9
+ id: import("@sinclair/typebox").TString;
10
+ name: import("@sinclair/typebox").TString;
11
+ description: import("@sinclair/typebox").TString;
12
+ }>>;
13
+ export declare const sitemapEntry: import("@sinclair/typebox").TObject<{
14
+ id: import("@sinclair/typebox").TString;
15
+ path: import("@sinclair/typebox").TString;
16
+ label: import("@sinclair/typebox").TString;
17
+ status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<"draft" | "published">>;
18
+ tags: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
19
+ sectionsPlan: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
20
+ id: import("@sinclair/typebox").TString;
21
+ name: import("@sinclair/typebox").TString;
22
+ description: import("@sinclair/typebox").TString;
23
+ }>>;
24
+ }>;
25
+ export declare const sitemapSchema: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
26
+ id: import("@sinclair/typebox").TString;
27
+ path: import("@sinclair/typebox").TString;
28
+ label: import("@sinclair/typebox").TString;
29
+ status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<"draft" | "published">>;
30
+ tags: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
31
+ sectionsPlan: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
32
+ id: import("@sinclair/typebox").TString;
33
+ name: import("@sinclair/typebox").TString;
34
+ description: import("@sinclair/typebox").TString;
35
+ }>>;
36
+ }>>;
37
+ export type Sitemap = Static<typeof sitemapSchema>;
38
+ //# sourceMappingURL=sitemap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sitemap.d.ts","sourceRoot":"","sources":["../../src/shared/sitemap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGtD,eAAO,MAAM,cAAc;;;;EAO1B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;AAErD,eAAO,MAAM,kBAAkB;;;;GAqB9B,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;EAyBxB,CAAC;AACF,eAAO,MAAM,aAAa;;;;;;;;;;;GAA2B,CAAC;AAEtD,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
+
3
+ import{a,b,c,d}from"./chunk-2AJYHJFG.js";import"./chunk-AJDYOLKP.js";export{a as pageInfoSchema,b as sectionsPlanSchema,c as sitemapEntry,d as sitemapSchema};
@@ -6,73 +6,95 @@ export declare const fontStacks: {
6
6
  export declare const themeSchema: import("@sinclair/typebox").TObject<{
7
7
  id: import("@sinclair/typebox").TString;
8
8
  name: import("@sinclair/typebox").TString;
9
- description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
10
- tags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
9
+ description: import("@sinclair/typebox").TString;
10
+ tags: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
11
+ browserColorScheme: import("@sinclair/typebox").TString;
11
12
  colors: import("@sinclair/typebox").TObject<{
12
13
  primary: import("@sinclair/typebox").TString;
14
+ primaryContent: import("@sinclair/typebox").TString;
13
15
  secondary: import("@sinclair/typebox").TString;
16
+ secondaryContent: import("@sinclair/typebox").TString;
14
17
  accent: import("@sinclair/typebox").TString;
18
+ accentContent: import("@sinclair/typebox").TString;
15
19
  neutral: import("@sinclair/typebox").TString;
20
+ neutralContent: import("@sinclair/typebox").TString;
21
+ base100: import("@sinclair/typebox").TString;
22
+ base200: import("@sinclair/typebox").TString;
23
+ base300: import("@sinclair/typebox").TString;
24
+ baseContent: import("@sinclair/typebox").TString;
16
25
  }>;
17
26
  typography: import("@sinclair/typebox").TObject<{
18
27
  base: import("@sinclair/typebox").TNumber;
19
28
  heading: import("@sinclair/typebox").TObject<{
20
- type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"stack">, import("@sinclair/typebox").TLiteral<"theme">, import("@sinclair/typebox").TLiteral<"google">]>;
29
+ type: import("@sinclair/typebox").TUnsafe<"stack" | "theme" | "google">;
21
30
  family: import("@sinclair/typebox").TString;
22
31
  }>;
23
32
  body: import("@sinclair/typebox").TObject<{
24
- type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"stack">, import("@sinclair/typebox").TLiteral<"theme">, import("@sinclair/typebox").TLiteral<"google">]>;
33
+ type: import("@sinclair/typebox").TUnsafe<"stack" | "theme" | "google">;
25
34
  family: import("@sinclair/typebox").TString;
26
35
  }>;
27
- alternatives: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
36
+ alternatives: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
28
37
  body: import("@sinclair/typebox").TObject<{
29
- type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"stack">, import("@sinclair/typebox").TLiteral<"theme">, import("@sinclair/typebox").TLiteral<"google">]>;
38
+ type: import("@sinclair/typebox").TUnsafe<"stack" | "theme" | "google">;
30
39
  family: import("@sinclair/typebox").TString;
31
40
  }>;
32
41
  heading: import("@sinclair/typebox").TObject<{
33
- type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"stack">, import("@sinclair/typebox").TLiteral<"theme">, import("@sinclair/typebox").TLiteral<"google">]>;
42
+ type: import("@sinclair/typebox").TUnsafe<"stack" | "theme" | "google">;
34
43
  family: import("@sinclair/typebox").TString;
35
44
  }>;
36
- }>>>;
45
+ }>>;
37
46
  }>;
38
47
  }>;
39
- /**
40
- * Process the theme schema and potentialy modify the typography entries by adding custom fonts defined in the theme to the accepted union.
41
- */
42
48
  export type Theme = Static<typeof themeSchema>;
43
49
  export declare const themeArray: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
44
50
  id: import("@sinclair/typebox").TString;
45
51
  name: import("@sinclair/typebox").TString;
46
- description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
47
- tags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
52
+ description: import("@sinclair/typebox").TString;
53
+ tags: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
54
+ browserColorScheme: import("@sinclair/typebox").TString;
48
55
  colors: import("@sinclair/typebox").TObject<{
49
56
  primary: import("@sinclair/typebox").TString;
57
+ primaryContent: import("@sinclair/typebox").TString;
50
58
  secondary: import("@sinclair/typebox").TString;
59
+ secondaryContent: import("@sinclair/typebox").TString;
51
60
  accent: import("@sinclair/typebox").TString;
61
+ accentContent: import("@sinclair/typebox").TString;
52
62
  neutral: import("@sinclair/typebox").TString;
63
+ neutralContent: import("@sinclair/typebox").TString;
64
+ base100: import("@sinclair/typebox").TString;
65
+ base200: import("@sinclair/typebox").TString;
66
+ base300: import("@sinclair/typebox").TString;
67
+ baseContent: import("@sinclair/typebox").TString;
53
68
  }>;
54
69
  typography: import("@sinclair/typebox").TObject<{
55
70
  base: import("@sinclair/typebox").TNumber;
56
71
  heading: import("@sinclair/typebox").TObject<{
57
- type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"stack">, import("@sinclair/typebox").TLiteral<"theme">, import("@sinclair/typebox").TLiteral<"google">]>;
72
+ type: import("@sinclair/typebox").TUnsafe<"stack" | "theme" | "google">;
58
73
  family: import("@sinclair/typebox").TString;
59
74
  }>;
60
75
  body: import("@sinclair/typebox").TObject<{
61
- type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"stack">, import("@sinclair/typebox").TLiteral<"theme">, import("@sinclair/typebox").TLiteral<"google">]>;
76
+ type: import("@sinclair/typebox").TUnsafe<"stack" | "theme" | "google">;
62
77
  family: import("@sinclair/typebox").TString;
63
78
  }>;
64
- alternatives: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
79
+ alternatives: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
65
80
  body: import("@sinclair/typebox").TObject<{
66
- type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"stack">, import("@sinclair/typebox").TLiteral<"theme">, import("@sinclair/typebox").TLiteral<"google">]>;
81
+ type: import("@sinclair/typebox").TUnsafe<"stack" | "theme" | "google">;
67
82
  family: import("@sinclair/typebox").TString;
68
83
  }>;
69
84
  heading: import("@sinclair/typebox").TObject<{
70
- type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"stack">, import("@sinclair/typebox").TLiteral<"theme">, import("@sinclair/typebox").TLiteral<"google">]>;
85
+ type: import("@sinclair/typebox").TUnsafe<"stack" | "theme" | "google">;
71
86
  family: import("@sinclair/typebox").TString;
72
87
  }>;
73
- }>>>;
88
+ }>>;
74
89
  }>;
75
90
  }>>;
76
91
  export type ThemeArray = Static<typeof themeArray>;
77
92
  export type FontType = Theme["typography"]["body"];
93
+ export declare const defaultTheme: Theme;
94
+ export declare function isDefaultTheme(theme: Theme): boolean;
95
+ /**
96
+ * Process a theme, eventually fixing colors and translating them to oklch notations
97
+ * @param theme
98
+ */
99
+ export declare function processTheme(theme: Theme): Theme;
78
100
  //# sourceMappingURL=theme.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/shared/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,UAAU;;;GAgBtB,CAAC;AA4CF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+DvB,CAAC;AAEF;;GAEG;AAyCH,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,WAAW,CAAC,CAAC;AAC/C,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA0B,CAAC;AAClD,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AACnD,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/shared/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAKtD,eAAO,MAAM,UAAU;;;GAgBtB,CAAC;AAsCF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsGvB,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,WAAW,CAAC,CAAC;AAC/C,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA0B,CAAC;AAClD,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AACnD,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD,eAAO,MAAM,YAAY,EAAE,KA0B1B,CAAC;AAEF,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAEpD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAehD"}
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a,b,c}from"./chunk-H6L4KRCJ.js";export{a as fontStacks,c as themeArray,b as themeSchema};
3
+ import{a,b,c,d,e,f}from"./chunk-3XCKZ4JQ.js";import"./chunk-AJDYOLKP.js";export{d as defaultTheme,a as fontStacks,e as isDefaultTheme,f as processTheme,c as themeArray,b as themeSchema};
@@ -1,318 +1,14 @@
1
1
  import type { Theme } from "../theme";
2
2
  export { default as chroma } from "chroma-js";
3
- export type ColorType = "primary" | "secondary" | "accent" | "neutral";
3
+ export type ColorType = keyof Theme["colors"];
4
4
  export type ElementColorType = "page-background" | "background" | "text" | "border" | "shadow";
5
- export type HarmonyType = "complementary" | "analogous" | "triadic" | "split-complementary" | "tetradic";
6
- export declare const colorAdjustments: readonly ["pastel", "soft", "default", "bold", "vibrant", "muted", "deep"];
7
- export declare const colorAdjustmentsLuminous: readonly ["pastel", "soft", "default", "bold", "vibrant"];
8
- export declare const colorAdjustmentsSubdued: readonly ["muted", "deep"];
9
- export type ColorAdjustment = (typeof colorAdjustments)[number];
10
- export declare const shades: readonly ["900", "800", "700", "600", "500", "400", "300", "200", "100", "50"];
5
+ export declare const baseColorsLabels: Record<ColorType, string>;
6
+ export declare const shadeNumbers: readonly [900, 800, 700, 600, 500, 400, 300, 200, 100, 50];
11
7
  export type ElementColor = string;
12
- interface ColorConstraints {
13
- lightness: number;
14
- saturation: number;
15
- }
16
- export declare const getHarmoniousHues: (baseHue: number, harmonyType: HarmonyType) => number[];
17
- export declare function getColorsSuggestions(baseHueOrColor: number | string, theme: Theme): number[];
18
- export declare const generateShades: (baseColor: string) => Record<string, string>;
19
- interface ContrastRequirements {
20
- minContrast: number;
21
- preferredContrast: number;
22
- }
8
+ export declare function getColorsSuggestions(baseHueOrColor: number | string, theme: Theme): never[];
23
9
  export declare function isStandardColor(color: unknown): boolean;
24
- export declare function getTextContrastedColor(element: HTMLElement): "#FFFFFF" | "#000000";
25
10
  export declare function propToStyle(prop: string | number | undefined, cssAttr: string): string | undefined;
11
+ export declare function getContrastingTextColor(backgroundColor: string, contrastThreshold?: number): string;
26
12
  export declare function propToClass(value: string | number | undefined, classPrefix: string): string | undefined;
27
13
  export declare function generateColorsVars(theme: Theme): Record<string, string>;
28
- interface TextColors {
29
- base: string;
30
- subtle: string;
31
- strong: string;
32
- tonal: string;
33
- "tonal-subtle": string;
34
- "tonal-strong": string;
35
- }
36
- export declare const generateTextColors: (backgroundColor: string, requirements?: ContrastRequirements) => TextColors;
37
- export declare const colorFamilies: {
38
- readonly Reds: readonly [{
39
- readonly name: "Red";
40
- readonly base: 0;
41
- readonly description: "Pure red";
42
- }, {
43
- readonly name: "Vermilion";
44
- readonly base: 5;
45
- readonly description: "Bright red-orange";
46
- }, {
47
- readonly name: "Scarlet";
48
- readonly base: 10;
49
- readonly description: "Bright orange-red";
50
- }, {
51
- readonly name: "Carmine";
52
- readonly base: 345;
53
- readonly description: "Deep red with purple";
54
- }, {
55
- readonly name: "Ruby";
56
- readonly base: 350;
57
- readonly description: "Deep, rich red";
58
- }, {
59
- readonly name: "Cherry";
60
- readonly base: 355;
61
- readonly description: "Deep red with slight blue";
62
- }];
63
- readonly Pinks: readonly [{
64
- readonly name: "Coral";
65
- readonly base: 15;
66
- readonly description: "Orange-pink";
67
- }, {
68
- readonly name: "Rose";
69
- readonly base: 330;
70
- readonly description: "Deep pink";
71
- }, {
72
- readonly name: "Hot Pink";
73
- readonly base: 335;
74
- readonly description: "Vivid pink";
75
- }, {
76
- readonly name: "Pink";
77
- readonly base: 340;
78
- readonly description: "True pink";
79
- }, {
80
- readonly name: "Rose Gold";
81
- readonly base: 345;
82
- readonly description: "Metallic pink";
83
- }, {
84
- readonly name: "Fuchsia";
85
- readonly base: 320;
86
- readonly description: "Vivid purple-pink";
87
- }, {
88
- readonly name: "Magenta";
89
- readonly base: 300;
90
- readonly description: "Pure magenta";
91
- }];
92
- readonly Purples: readonly [{
93
- readonly name: "Purple";
94
- readonly base: 270;
95
- readonly description: "True purple";
96
- }, {
97
- readonly name: "Lavender";
98
- readonly base: 275;
99
- readonly description: "Light purple";
100
- }, {
101
- readonly name: "Violet";
102
- readonly base: 280;
103
- readonly description: "Blue-purple";
104
- }, {
105
- readonly name: "Mauve";
106
- readonly base: 285;
107
- readonly description: "Muted purple";
108
- }, {
109
- readonly name: "Plum";
110
- readonly base: 290;
111
- readonly description: "Deep purple";
112
- }, {
113
- readonly name: "Orchid";
114
- readonly base: 295;
115
- readonly description: "Light violet-purple";
116
- }];
117
- readonly Blues: readonly [{
118
- readonly name: "Arctic";
119
- readonly base: 200;
120
- readonly description: "Icy blue";
121
- }, {
122
- readonly name: "Cerulean";
123
- readonly base: 205;
124
- readonly description: "Sky-ocean blue";
125
- }, {
126
- readonly name: "Blue";
127
- readonly base: 210;
128
- readonly description: "True blue";
129
- }, {
130
- readonly name: "Cobalt";
131
- readonly base: 215;
132
- readonly description: "Pure deep blue";
133
- }, {
134
- readonly name: "Navy";
135
- readonly base: 220;
136
- readonly description: "Dark blue";
137
- }, {
138
- readonly name: "Indigo";
139
- readonly base: 230;
140
- readonly description: "Deep blue-purple";
141
- }];
142
- readonly Cyans: readonly [{
143
- readonly name: "Aquamarine";
144
- readonly base: 160;
145
- readonly description: "Light blue-green";
146
- }, {
147
- readonly name: "Teal";
148
- readonly base: 170;
149
- readonly description: "Dark blue-green";
150
- }, {
151
- readonly name: "Turquoise";
152
- readonly base: 175;
153
- readonly description: "Blue-green";
154
- }, {
155
- readonly name: "Cyan";
156
- readonly base: 180;
157
- readonly description: "Pure cyan";
158
- }, {
159
- readonly name: "Ocean";
160
- readonly base: 185;
161
- readonly description: "Deep water blue";
162
- }, {
163
- readonly name: "Aqua";
164
- readonly base: 190;
165
- readonly description: "Light blue-green";
166
- }];
167
- readonly Greens: readonly [{
168
- readonly name: "Lime";
169
- readonly base: 90;
170
- readonly description: "Yellow-tinted green";
171
- }, {
172
- readonly name: "Olive";
173
- readonly base: 110;
174
- readonly description: "Yellow-green";
175
- }, {
176
- readonly name: "Green";
177
- readonly base: 120;
178
- readonly description: "True green";
179
- }, {
180
- readonly name: "Jade";
181
- readonly base: 130;
182
- readonly description: "Rich medium green";
183
- }, {
184
- readonly name: "Sage";
185
- readonly base: 135;
186
- readonly description: "Muted green";
187
- }, {
188
- readonly name: "Emerald";
189
- readonly base: 140;
190
- readonly description: "Bright green";
191
- }, {
192
- readonly name: "Forest";
193
- readonly base: 150;
194
- readonly description: "Dark green";
195
- }, {
196
- readonly name: "Mint";
197
- readonly base: 160;
198
- readonly description: "Light cool green";
199
- }];
200
- readonly Yellows: readonly [{
201
- readonly name: "Honey";
202
- readonly base: 43;
203
- readonly description: "Warm yellow";
204
- }, {
205
- readonly name: "Gold";
206
- readonly base: 45;
207
- readonly description: "Yellow-orange";
208
- }, {
209
- readonly name: "Banana";
210
- readonly base: 52;
211
- readonly description: "Warm light yellow";
212
- }, {
213
- readonly name: "Butter";
214
- readonly base: 55;
215
- readonly description: "Soft yellow";
216
- }, {
217
- readonly name: "Lemon";
218
- readonly base: 58;
219
- readonly description: "Light yellow";
220
- }, {
221
- readonly name: "Yellow";
222
- readonly base: 60;
223
- readonly description: "True yellow";
224
- }];
225
- readonly Oranges: readonly [{
226
- readonly name: "Rust";
227
- readonly base: 20;
228
- readonly description: "Dark orange-brown";
229
- }, {
230
- readonly name: "Tangerine";
231
- readonly base: 25;
232
- readonly description: "Bright orange";
233
- }, {
234
- readonly name: "Orange";
235
- readonly base: 30;
236
- readonly description: "True orange";
237
- }, {
238
- readonly name: "Marigold";
239
- readonly base: 35;
240
- readonly description: "Deep yellow-orange";
241
- }];
242
- readonly Browns: readonly [{
243
- readonly name: "Sienna";
244
- readonly base: 20;
245
- readonly description: "Reddish brown";
246
- }, {
247
- readonly name: "Cedar";
248
- readonly base: 22;
249
- readonly description: "Red-tinted brown";
250
- }, {
251
- readonly name: "Brown";
252
- readonly base: 25;
253
- readonly description: "True brown";
254
- }, {
255
- readonly name: "Sepia";
256
- readonly base: 30;
257
- readonly description: "Warm dark brown";
258
- }, {
259
- readonly name: "Tan";
260
- readonly base: 34;
261
- readonly description: "Light brown";
262
- }, {
263
- readonly name: "Khaki";
264
- readonly base: 37;
265
- readonly description: "Yellow-brown";
266
- }];
267
- readonly Grays: readonly [{
268
- readonly name: "Charcoal";
269
- readonly base: 200;
270
- readonly description: "Dark gray";
271
- readonly lowSaturation: true;
272
- }, {
273
- readonly name: "Silver";
274
- readonly base: 210;
275
- readonly description: "Light metallic gray";
276
- readonly lowSaturation: true;
277
- }, {
278
- readonly name: "Slate";
279
- readonly base: 215;
280
- readonly description: "Blue-gray";
281
- readonly lowSaturation: true;
282
- }, {
283
- readonly name: "Gray";
284
- readonly base: 220;
285
- readonly description: "True gray";
286
- readonly lowSaturation: true;
287
- }, {
288
- readonly name: "Steel";
289
- readonly base: 225;
290
- readonly description: "Cool gray";
291
- readonly lowSaturation: true;
292
- }];
293
- };
294
- export declare const colorAdjustmentBaseValues: Record<ColorAdjustment, Record<ColorType, ColorConstraints>>;
295
- /**
296
- * Color Variants
297
- * Different visual variants for color application
298
- */
299
- export type ColorVariant = "surface" | "filled" | "soft" | "ghost" | "outlined" | "faded" | "glazed" | "solid";
300
- export declare const generateVariantClasses: (variant: ColorVariant, colorType: ColorType) => {
301
- base: {
302
- background: string;
303
- content: string;
304
- };
305
- hover: {
306
- background: string;
307
- content: string;
308
- };
309
- active: {
310
- background: string;
311
- content: string;
312
- };
313
- disabled: {
314
- background: string;
315
- content: string;
316
- };
317
- };
318
14
  //# sourceMappingURL=color-system.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"color-system.d.ts","sourceRoot":"","sources":["../../../src/shared/themes/color-system.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,WAAW,CAAC;AAG9C,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AACvE,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE/F,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG,WAAW,GAAG,SAAS,GAAG,qBAAqB,GAAG,UAAU,CAAC;AAEzG,eAAO,MAAM,gBAAgB,4EAA6E,CAAC;AAC3G,eAAO,MAAM,wBAAwB,2DAA4D,CAAC;AAClG,eAAO,MAAM,uBAAuB,4BAA6B,CAAC;AAElE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,eAAO,MAAM,MAAM,gFAAiF,CAAC;AAGrG,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAGlC,UAAU,gBAAgB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,iBAAiB,YAAa,MAAM,eAAe,WAAW,aAa1E,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,KAAK,YAiBjF;AAED,eAAO,MAAM,cAAc,cAAe,MAAM,2BAsF/C,CAAC;AAEF,UAAU,oBAAoB;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAOvD;AAID,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,yBA0C1D;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,sBAM7E;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAAE,WAAW,EAAE,MAAM,sBAKlF;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,0BA6B9C;AAED,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,kBAAkB,oBACZ,MAAM,iBACT,oBAAoB,KACjC,UA+DF,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0FhB,CAAC;AAGX,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAyIzF,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,QAAQ,GACR,MAAM,GACN,OAAO,GACP,UAAU,GACV,OAAO,GACP,QAAQ,GACR,OAAO,CAAC;AAuJZ,eAAO,MAAM,sBAAsB,YAAa,YAAY,aAAa,SAAS;;;;;;;;;;;;;;;;;CA4BjF,CAAC"}
1
+ {"version":3,"file":"color-system.d.ts","sourceRoot":"","sources":["../../../src/shared/themes/color-system.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,WAAW,CAAC;AAI9C,MAAM,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC9C,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE/F,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAatD,CAAC;AAEF,eAAO,MAAM,YAAY,4DAA6D,CAAC;AASvF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,KAAK,WAEjF;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAYvD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,sBAM7E;AAED,wBAAgB,uBAAuB,CAAC,eAAe,EAAE,MAAM,EAAE,iBAAiB,SAAM,GAAG,MAAM,CA6BhG;AACD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAAE,WAAW,EAAE,MAAM,sBAKlF;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,0BA4B9C"}
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import s from"chroma-js";import{default as X}from"chroma-js";import{colors as p,css as F,tx as L}from"@upstart.gg/style-system/twind";var V=["pastel","soft","default","bold","vibrant","muted","deep"],I=["pastel","soft","default","bold","vibrant"],q=["muted","deep"],E=["900","800","700","600","500","400","300","200","100","50"],k=(e,t)=>{switch(t){case"complementary":return[e,(e+180)%360];case"analogous":return[(e-30+360)%360,e,(e+30)%360];case"triadic":return[e,(e+120)%360,(e+240)%360];case"split-complementary":return[e,(e+150)%360,(e+210)%360];case"tetradic":return[e,(e+90)%360,(e+180)%360,(e+270)%360]}};function W(e,t){let n=typeof e=="string"?s(e).get("hsl.h"):e,r=[...Object.values(t.colors).map(c=>s(c).get("hsl.h")),n];return Array.from(new Set([...k(n,"complementary"),...k(n,"analogous"),...k(n,"triadic"),...k(n,"tetradic"),...k(n,"split-complementary")])).sort().filter(c=>r.includes(c)===!1).slice(0,8)}var R=e=>{let t=s(e).oklab(),[n,i,r]=t,c=Math.sqrt(i*i+r*r),a=Math.atan2(r,i),l={50:[.52,.1],100:[.45,.2],200:[.35,.35],300:[.2,.8],400:[.1,.8],500:[0,1],600:[-.05,1.1],700:[-.1,1.2],800:[-.15,1.3],900:[-.2,1.4]},o={},u=new Set;return Object.entries(l).forEach(([d,[C,y]])=>{try{let m=Math.max(.01,Math.min(.99,n+C)),h=c*y,f=h*Math.cos(a),g=h*Math.sin(a),b=s.oklab(m,f,g).hex(),w=parseInt(d,10);if(u.has(b)){let $=m+(w>500?-.02:.02),v=h*(w>500?1.05:.95),M=v*Math.cos(a),B=v*Math.sin(a);o[d]=s.oklab($,M,B).hex()}else o[d]=b;u.add(o[d])}catch(m){console.error(`Error generating shade ${d}:`,m),o[d]=e}}),new Set(Object.values(o)).size!==Object.keys(l).length&&Object.entries(o).forEach(([d,C],y)=>{if(y>0&&o[Object.keys(o)[y-1]]===C){let[m,h]=l[d],f=n+m*1.2,g=c*(h*1.1),b=g*Math.cos(a),w=g*Math.sin(a);o[d]=s.oklab(f,b,w).hex()}}),o};function T(e){return typeof e!="string"?!1:e.startsWith("rgb")||e.startsWith("hsl")||e.startsWith("#")||e.startsWith("var(--")}var S={minContrast:4,preferredContrast:7};function j(e){let t=window.getComputedStyle(e),{backgroundColor:n,backgroundImage:i}=t,r=s(n);if(r.alpha()<.7){if(i!=="none"){let l=i.match(/(rgb|hsl)\(.*?\)/g);if(l)for(let o of l){let u=s(o);(u.luminance()<r.luminance()||!r.luminance())&&(r=u)}}if(r.alpha()<.7){let l=e.parentElement;if(l)return j(l)}}let c=s.contrast(r,"#000000"),a=s.contrast(r,"#FFFFFF");return(a>=S.minContrast||c>=S.minContrast)&&(a>c||c-a<2)?"#FFFFFF":"#000000"}function G(e,t){if(!(typeof e>"u"))return T(e)||typeof e=="number"?F({[t]:e}):L(e)}function Y(e,t){if(!(typeof e>"u"))return T(e)||typeof e=="number"?`${t}-[${e}]`:e}function z(e){let t=Object.entries(e.colors).reduce((n,[i,r])=>{n[`color-${i}`]=r;for(let[c,a]of Object.entries(R(r))){n[`color-${i}-${c}`]=a;for(let[l,o]of Object.entries(D(a)))l==="base"?n[`text-${i}-${c}`]=o:n[`text-${i}-${c}-${l}`]=o}return n},{});return t["color-gray-50"]=p.gray[50],t["color-gray-100"]=p.gray[100],t["color-gray-200"]=p.gray[200],t["color-gray-300"]=p.gray[300],t["color-gray-400"]=p.gray[400],t["color-gray-500"]=p.gray[500],t["color-gray-600"]=p.gray[600],t["color-gray-700"]=p.gray[700],t["color-gray-800"]=p.gray[800],t["color-gray-900"]=p.gray[900],t}var D=(e,t={minContrast:4.5,preferredContrast:7})=>{try{let n=s(e),i=n.luminance(),[r,c,a]=n.hsl(),l=i>.5?"#000000":"#FFFFFF",o={base:l,subtle:s.mix(e,l,.4).hex(),strong:s.mix(e,l,.9).hex()},u=f=>{let g=c,b=s.hsl(r,g,f);for(;s.contrast(e,b)<t.minContrast&&g<1;)g=Math.min(1,g+.1),b=s.hsl(r,g,f);return b.hex()},x=u(Math.min(.95,a+.4)),d=u(Math.max(.05,a-.4)),C=s.contrast(e,x),y=s.contrast(e,d),h={tonal:C>y?x:d,"tonal-subtle":i>.5?u(Math.max(.1,a-.2)):u(Math.min(.9,a+.2)),"tonal-strong":i>.5?u(Math.max(.05,a-.6)):u(Math.min(.95,a+.6))};return{...o,...h}}catch{return console.warn("Invalid color provided:",e),{base:"#000000",subtle:"#000000",strong:"#000000",tonal:"#000000","tonal-subtle":"#000000","tonal-strong":"#000000"}}},K={Reds:[{name:"Red",base:0,description:"Pure red"},{name:"Vermilion",base:5,description:"Bright red-orange"},{name:"Scarlet",base:10,description:"Bright orange-red"},{name:"Carmine",base:345,description:"Deep red with purple"},{name:"Ruby",base:350,description:"Deep, rich red"},{name:"Cherry",base:355,description:"Deep red with slight blue"}],Pinks:[{name:"Coral",base:15,description:"Orange-pink"},{name:"Rose",base:330,description:"Deep pink"},{name:"Hot Pink",base:335,description:"Vivid pink"},{name:"Pink",base:340,description:"True pink"},{name:"Rose Gold",base:345,description:"Metallic pink"},{name:"Fuchsia",base:320,description:"Vivid purple-pink"},{name:"Magenta",base:300,description:"Pure magenta"}],Purples:[{name:"Purple",base:270,description:"True purple"},{name:"Lavender",base:275,description:"Light purple"},{name:"Violet",base:280,description:"Blue-purple"},{name:"Mauve",base:285,description:"Muted purple"},{name:"Plum",base:290,description:"Deep purple"},{name:"Orchid",base:295,description:"Light violet-purple"}],Blues:[{name:"Arctic",base:200,description:"Icy blue"},{name:"Cerulean",base:205,description:"Sky-ocean blue"},{name:"Blue",base:210,description:"True blue"},{name:"Cobalt",base:215,description:"Pure deep blue"},{name:"Navy",base:220,description:"Dark blue"},{name:"Indigo",base:230,description:"Deep blue-purple"}],Cyans:[{name:"Aquamarine",base:160,description:"Light blue-green"},{name:"Teal",base:170,description:"Dark blue-green"},{name:"Turquoise",base:175,description:"Blue-green"},{name:"Cyan",base:180,description:"Pure cyan"},{name:"Ocean",base:185,description:"Deep water blue"},{name:"Aqua",base:190,description:"Light blue-green"}],Greens:[{name:"Lime",base:90,description:"Yellow-tinted green"},{name:"Olive",base:110,description:"Yellow-green"},{name:"Green",base:120,description:"True green"},{name:"Jade",base:130,description:"Rich medium green"},{name:"Sage",base:135,description:"Muted green"},{name:"Emerald",base:140,description:"Bright green"},{name:"Forest",base:150,description:"Dark green"},{name:"Mint",base:160,description:"Light cool green"}],Yellows:[{name:"Honey",base:43,description:"Warm yellow"},{name:"Gold",base:45,description:"Yellow-orange"},{name:"Banana",base:52,description:"Warm light yellow"},{name:"Butter",base:55,description:"Soft yellow"},{name:"Lemon",base:58,description:"Light yellow"},{name:"Yellow",base:60,description:"True yellow"}],Oranges:[{name:"Rust",base:20,description:"Dark orange-brown"},{name:"Tangerine",base:25,description:"Bright orange"},{name:"Orange",base:30,description:"True orange"},{name:"Marigold",base:35,description:"Deep yellow-orange"}],Browns:[{name:"Sienna",base:20,description:"Reddish brown"},{name:"Cedar",base:22,description:"Red-tinted brown"},{name:"Brown",base:25,description:"True brown"},{name:"Sepia",base:30,description:"Warm dark brown"},{name:"Tan",base:34,description:"Light brown"},{name:"Khaki",base:37,description:"Yellow-brown"}],Grays:[{name:"Charcoal",base:200,description:"Dark gray",lowSaturation:!0},{name:"Silver",base:210,description:"Light metallic gray",lowSaturation:!0},{name:"Slate",base:215,description:"Blue-gray",lowSaturation:!0},{name:"Gray",base:220,description:"True gray",lowSaturation:!0},{name:"Steel",base:225,description:"Cool gray",lowSaturation:!0}]},J={default:{primary:{saturation:65,lightness:50},secondary:{saturation:65,lightness:50},accent:{saturation:65,lightness:50},neutral:{saturation:10,lightness:50}},pastel:{primary:{saturation:55,lightness:68},secondary:{saturation:55,lightness:68},accent:{saturation:55,lightness:68},neutral:{saturation:5,lightness:68}},soft:{primary:{saturation:45,lightness:60},secondary:{saturation:45,lightness:60},accent:{saturation:45,lightness:60},neutral:{saturation:8,lightness:60}},bold:{primary:{saturation:70,lightness:45},secondary:{saturation:70,lightness:45},accent:{saturation:70,lightness:45},neutral:{saturation:12,lightness:45}},deep:{primary:{saturation:60,lightness:40},secondary:{saturation:60,lightness:40},accent:{saturation:60,lightness:40},neutral:{saturation:10,lightness:40}},vibrant:{primary:{saturation:75,lightness:55},secondary:{saturation:75,lightness:55},accent:{saturation:75,lightness:55},neutral:{saturation:15,lightness:55}},muted:{primary:{saturation:37,lightness:48},secondary:{saturation:37,lightness:48},accent:{saturation:37,lightness:48},neutral:{saturation:8,lightness:48}}},A={surface:{background:{base:"50",hover:"100",active:"200",disabled:"50"},content:{useContrast:!0,useTonal:!1},description:"Light backgrounds for large surfaces and containers",usage:["Page backgrounds","Cards","Containers","Panels","Sidebars"]},filled:{background:{base:"600",hover:"700",active:"800",disabled:"400"},content:{useContrast:!0,useTonal:!1},description:"Solid colored backgrounds with contrasting content",usage:["Primary buttons","Call-to-action elements","Selected states","Important UI elements","Navigation items"]},soft:{background:{base:"100",hover:"200",active:"300",disabled:"50"},content:{useContrast:!1,useTonal:!0},description:"Subtle, gentle color application for secondary elements",usage:["Secondary buttons","Background highlights","Selected items","Tags","Chips"]},ghost:{background:{base:"transparent",hover:"50",active:"100",disabled:"transparent"},content:{useContrast:!1,useTonal:!0},description:"Transparent background with colored content",usage:["Text buttons","Links","Menu items","Low-emphasis actions","Inline elements"]},outlined:{background:{base:"transparent",hover:"50",active:"100",disabled:"transparent"},content:{useContrast:!1,useTonal:!0},description:"Bordered elements with optional light background on interaction",usage:["Secondary buttons","Selectable cards","Input fields","Dropdown triggers","Menu items"]},faded:{background:{base:"50",hover:"100",active:"100",disabled:"50"},content:{useContrast:!1,useTonal:!0},description:"Very light, subtle color application",usage:["Background accents","Disabled states","Inactive elements","Secondary information","Subtle indicators"]},glazed:{background:{base:"100",hover:"200",active:"300",disabled:"50"},content:{useContrast:!0,useTonal:!1},description:"Semi-transparent color application with blur effect",usage:["Modal backgrounds","Overlay panels","Floating elements","Tooltips","Context menus"]},solid:{background:{base:"500",hover:"600",active:"700",disabled:"300"},content:{useContrast:!0,useTonal:!1},description:"Full solid color application with medium emphasis",usage:["Headers","Navigation bars","Important sections","Progress indicators","Status indicators"]}},U=(e,t)=>{let n=A[e];return{base:{background:`bg-${t}-${n.background.base}`,content:n.content.useTonal?`text-${t}-${n.background.base}-tonal`:`text-${t}-${n.background.base}-base`},hover:{background:`hover:bg-${t}-${n.background.hover}`,content:n.content.useTonal?`hover:text-${t}-${n.background.hover}-tonal`:`hover:text-${t}-${n.background.hover}-base`},active:{background:`active:bg-${t}-${n.background.active}`,content:n.content.useTonal?`active:text-${t}-${n.background.active}-tonal`:`active:text-${t}-${n.background.active}-base`},disabled:{background:`bg-${t}-${n.background.disabled}`,content:n.content.useTonal?`text-${t}-${n.background.disabled}-tonal`:`text-${t}-${n.background.disabled}-base`}}};export{X as chroma,J as colorAdjustmentBaseValues,V as colorAdjustments,I as colorAdjustmentsLuminous,q as colorAdjustmentsSubdued,K as colorFamilies,z as generateColorsVars,R as generateShades,D as generateTextColors,U as generateVariantClasses,W as getColorsSuggestions,k as getHarmoniousHues,j as getTextContrastedColor,T as isStandardColor,Y as propToClass,G as propToStyle,E as shades};
3
+ import i from"chroma-js";import{default as E}from"chroma-js";import{kebabCase as f}from"lodash-es";import{css as d}from"@upstart.gg/style-system/twind";var C={primary:"Primary",secondary:"Secondary",accent:"Accent",neutral:"Neutral",base100:"Base (level 1)",base200:"Base (level 2)",base300:"Base (level 3)",baseContent:"Base content",primaryContent:"Primary content",secondaryContent:"Secondary content",accentContent:"Accent content",neutralContent:"Neutral content"},p=[900,800,700,600,500,400,300,200,100,50],m={100:"subtle",300:"light",700:"bold"};function x(t,e){return[]}function b(t){return typeof t!="string"?!1:t.startsWith("oklch")||t.startsWith("oklab")||t.startsWith("rgb")||t.startsWith("hsl")||t.startsWith("#")||t.startsWith("var(--")}function k(t,e){if(!(typeof t>"u"))return b(t)||typeof t=="number"?d({[e]:t}):t}function W(t,e=4.5){let r=i(t),n="#ffffff",o="#000000",s=i.contrast(r,n),a=i.contrast(r,o);return s>=e&&a>=e?s>=a?n:o:s>=e?n:a>=e?o:s>=a?n:o}function S(t,e){if(!(typeof t>"u"))return b(t)||typeof t=="number"?`${e}-[${t}]`:t}function $(t){let e={};return Object.entries(t.colors).forEach(([r,n])=>{if(e[`color-${f(r)}`]=n,r.startsWith("base"))return;let o=i(n).darken(2.5),s=i(n).brighten(3.5),a=i.scale([s,n,o]).domain([50,500,900]).mode("lab");p.forEach(c=>{let u=`color-${f(r)}-${c}`,l=a(c).oklch();e[u]=`oklch(${l.join(" ")})`,m[c]&&(e[`color-${f(r)}-${m[c]}`]=e[u])})}),e}export{C as baseColorsLabels,E as chroma,$ as generateColorsVars,x as getColorsSuggestions,W as getContrastingTextColor,b as isStandardColor,S as propToClass,k as propToStyle,p as shadeNumbers};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a}from"../chunk-WXKRIUTA.js";export{a as default};
3
+ var i="Invariant failed";function e(r,n){if(r)return;let t=typeof n=="function"?n():n,o=t?`${i}: ${t}`:i;throw new Error(o)}export{e as default};
@@ -1,4 +1,13 @@
1
- import type { TObject } from "@sinclair/typebox";
2
1
  import type { JSONSchemaType } from "ajv";
2
+ import { type TObject, type UnsafeOptions } from "@sinclair/typebox";
3
3
  export declare function typeboxSchemaToJSONSchema<T extends Record<string, any>>(schema: TObject): JSONSchemaType<T>;
4
+ type StringEnumOptions = Partial<UnsafeOptions> & {
5
+ enumNames?: string[];
6
+ };
7
+ export declare const StringEnum: <T extends string[]>(values: [...T], options?: StringEnumOptions) => import("@sinclair/typebox").TUnsafe<T[number]>;
8
+ export declare function getLitteralFromEnum(schema: ReturnType<typeof StringEnum>): {
9
+ const: string;
10
+ title: string;
11
+ }[];
12
+ export {};
4
13
  //# sourceMappingURL=schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAG1C,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,GAAG,cAAc,CAAC,CAAC,CAAC,CAE3G"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,EAAqB,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGxF,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,GAAG,cAAc,CAAC,CAAC,CAAC,CAE3G;AAED,KAAK,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG;IAChD,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,YAAW,iBAAiB,mDAKrF,CAAC;AAEL,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC;;;IAUxE"}
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- function t(e){return JSON.parse(JSON.stringify(e))}export{t as typeboxSchemaToJSONSchema};
3
+ import{a,b,c}from"../chunk-AJDYOLKP.js";export{b as StringEnum,c as getLitteralFromEnum,a as typeboxSchemaToJSONSchema};
@@ -0,0 +1,32 @@
1
+ import { type SchemaOptions } from "@sinclair/typebox";
2
+ import type { preset } from "../bricks/props/preset";
3
+ import type { background, backgroundColor } from "../bricks/props/background";
4
+ import type { basicAlign } from "../bricks/props/align";
5
+ import type { containerLayout } from "../bricks/props/container";
6
+ import type { hidden } from "../bricks/props/common";
7
+ import type { border } from "../bricks/props/border";
8
+ import type { padding } from "../bricks/props/padding";
9
+ import type { image } from "../bricks/props/image";
10
+ import type { color } from "../bricks/props/color";
11
+ import type { shadow } from "../bricks/props/effects";
12
+ import type { textContent } from "../bricks/props/text";
13
+ import type { cssLength } from "../bricks/props/css-length";
14
+ import type { urlOrPageId } from "../bricks/props/string";
15
+ export interface SchemaTypeMap {
16
+ "styles:preset": ReturnType<typeof preset>;
17
+ "styles:background": ReturnType<typeof background>;
18
+ "styles:backgroundColor": ReturnType<typeof backgroundColor>;
19
+ "styles:basicAlign": ReturnType<typeof basicAlign>;
20
+ "styles:containerLayout": ReturnType<typeof containerLayout>;
21
+ "styles:hidden": ReturnType<typeof hidden>;
22
+ "styles:border": ReturnType<typeof border>;
23
+ "styles:padding": ReturnType<typeof padding>;
24
+ "styles:color": ReturnType<typeof color>;
25
+ "styles:shadow": ReturnType<typeof shadow>;
26
+ "styles:cssLength": ReturnType<typeof cssLength>;
27
+ "assets:image": ReturnType<typeof image>;
28
+ "content:text": ReturnType<typeof textContent>;
29
+ "content:urlOrPageId": ReturnType<typeof urlOrPageId>;
30
+ }
31
+ export declare function typedRef<K extends keyof SchemaTypeMap>(id: K, options?: SchemaOptions): SchemaTypeMap[K];
32
+ //# sourceMappingURL=typed-ref.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typed-ref.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/typed-ref.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAgC,MAAM,mBAAmB,CAAC;AACrF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,WAAW,aAAa;IAC5B,eAAe,EAAE,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;IAC3C,mBAAmB,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;IACnD,wBAAwB,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;IAC7D,mBAAmB,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;IACnD,wBAAwB,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;IAC7D,eAAe,EAAE,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;IAC3C,eAAe,EAAE,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;IAC3C,gBAAgB,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;IAC7C,cAAc,EAAE,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;IACzC,eAAe,EAAE,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;IAC3C,kBAAkB,EAAE,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;IACjD,cAAc,EAAE,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;IACzC,cAAc,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;IAC/C,qBAAqB,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;CAEvD;AAGD,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,aAAa,EACpD,EAAE,EAAE,CAAC,EACL,OAAO,GAAE,aAAkB,GAC1B,aAAa,CAAC,CAAC,CAAC,CAGlB"}
@@ -0,0 +1,3 @@
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
+
3
+ import{a}from"../chunk-OYIL5SCU.js";export{a as typedRef};