@upstart.gg/sdk 0.0.78 → 0.0.80

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 (296) hide show
  1. package/dist/node/cli/api.js +3 -3
  2. package/dist/node/cli/commands/build/cmd-build.js +1 -1
  3. package/dist/node/cli/commands/login/cmd-login.js +8 -8
  4. package/dist/node/cli/commands/logout/cmd-logout.js +3 -3
  5. package/dist/node/cli/commands/publish/cmd-publish.js +19 -19
  6. package/dist/node/cli/commands/publish/parse-gitignore.d.ts +1 -1
  7. package/dist/node/cli/commands/publish/parse-gitignore.js +2 -2
  8. package/dist/node/cli/commands/publish/uploader.js +6 -6
  9. package/dist/node/cli/constants.d.ts +2 -2
  10. package/dist/node/cli/constants.d.ts.map +1 -1
  11. package/dist/node/cli/constants.js +2 -2
  12. package/dist/node/cli/is-logged-in.js +3 -3
  13. package/dist/node/cli/program.js +16 -16
  14. package/dist/node/cli/store.js +2 -2
  15. package/dist/node/cli/types.js +1 -1
  16. package/dist/node/cli/utils.js +1 -1
  17. package/dist/node/shared/config.d.ts +1 -1
  18. package/dist/node/shared/config.d.ts.map +1 -1
  19. package/dist/node/shared/config.js +6 -6
  20. package/dist/node/shared/logger.d.ts +2 -2
  21. package/dist/node/shared/logger.d.ts.map +1 -1
  22. package/dist/node/shared/logger.js +3 -3
  23. package/dist/shared/ajv.d.ts +1 -0
  24. package/dist/shared/ajv.d.ts.map +1 -1
  25. package/dist/shared/ajv.js +2 -2
  26. package/dist/shared/analytics/init.js +1 -1
  27. package/dist/shared/analytics/track.js +1 -1
  28. package/dist/shared/analytics/types.js +1 -1
  29. package/dist/shared/attributes.d.ts +18 -13
  30. package/dist/shared/attributes.d.ts.map +1 -1
  31. package/dist/shared/attributes.js +2 -2
  32. package/dist/shared/brick-manifest.d.ts +95 -46
  33. package/dist/shared/brick-manifest.d.ts.map +1 -1
  34. package/dist/shared/brick-manifest.js +2 -2
  35. package/dist/shared/bricks/manifests/all-manifests.d.ts +2 -3
  36. package/dist/shared/bricks/manifests/all-manifests.d.ts.map +1 -1
  37. package/dist/shared/bricks/manifests/all-manifests.js +2 -2
  38. package/dist/shared/bricks/manifests/button.manifest.d.ts +43 -124
  39. package/dist/shared/bricks/manifests/button.manifest.d.ts.map +1 -1
  40. package/dist/shared/bricks/manifests/button.manifest.js +2 -2
  41. package/dist/shared/bricks/manifests/card.manifest.d.ts +76 -137
  42. package/dist/shared/bricks/manifests/card.manifest.d.ts.map +1 -1
  43. package/dist/shared/bricks/manifests/card.manifest.js +2 -2
  44. package/dist/shared/bricks/manifests/carousel.manifest.d.ts +40 -124
  45. package/dist/shared/bricks/manifests/carousel.manifest.d.ts.map +1 -1
  46. package/dist/shared/bricks/manifests/carousel.manifest.js +2 -2
  47. package/dist/shared/bricks/manifests/container.manifest.d.ts +205 -123
  48. package/dist/shared/bricks/manifests/container.manifest.d.ts.map +1 -1
  49. package/dist/shared/bricks/manifests/container.manifest.js +2 -2
  50. package/dist/shared/bricks/manifests/countdown.manifest.d.ts +40 -76
  51. package/dist/shared/bricks/manifests/countdown.manifest.d.ts.map +1 -1
  52. package/dist/shared/bricks/manifests/countdown.manifest.js +2 -2
  53. package/dist/shared/bricks/manifests/footer.manifest.d.ts +64 -75
  54. package/dist/shared/bricks/manifests/footer.manifest.d.ts.map +1 -1
  55. package/dist/shared/bricks/manifests/footer.manifest.js +2 -2
  56. package/dist/shared/bricks/manifests/form.manifest.d.ts +40 -78
  57. package/dist/shared/bricks/manifests/form.manifest.d.ts.map +1 -1
  58. package/dist/shared/bricks/manifests/form.manifest.js +2 -2
  59. package/dist/shared/bricks/manifests/generic-component.manifest.d.ts +43 -124
  60. package/dist/shared/bricks/manifests/generic-component.manifest.d.ts.map +1 -1
  61. package/dist/shared/bricks/manifests/generic-component.manifest.js +2 -2
  62. package/dist/shared/bricks/manifests/header.manifest.d.ts +257 -75
  63. package/dist/shared/bricks/manifests/header.manifest.d.ts.map +1 -1
  64. package/dist/shared/bricks/manifests/header.manifest.js +2 -2
  65. package/dist/shared/bricks/manifests/hero.manifest.d.ts +100 -113
  66. package/dist/shared/bricks/manifests/hero.manifest.d.ts.map +1 -1
  67. package/dist/shared/bricks/manifests/hero.manifest.js +2 -2
  68. package/dist/shared/bricks/manifests/icon.manifest.d.ts +40 -76
  69. package/dist/shared/bricks/manifests/icon.manifest.d.ts.map +1 -1
  70. package/dist/shared/bricks/manifests/icon.manifest.js +2 -2
  71. package/dist/shared/bricks/manifests/image.manifest.d.ts +84 -77
  72. package/dist/shared/bricks/manifests/image.manifest.d.ts.map +1 -1
  73. package/dist/shared/bricks/manifests/image.manifest.js +2 -2
  74. package/dist/shared/bricks/manifests/images-gallery.manifest.d.ts +184 -0
  75. package/dist/shared/bricks/manifests/images-gallery.manifest.d.ts.map +1 -0
  76. package/dist/shared/bricks/manifests/images-gallery.manifest.js +3 -0
  77. package/dist/shared/bricks/manifests/map.manifest.d.ts +40 -74
  78. package/dist/shared/bricks/manifests/map.manifest.d.ts.map +1 -1
  79. package/dist/shared/bricks/manifests/map.manifest.js +2 -2
  80. package/dist/shared/bricks/manifests/sidebar.manifest.d.ts +57 -0
  81. package/dist/shared/bricks/manifests/sidebar.manifest.d.ts.map +1 -0
  82. package/dist/shared/bricks/manifests/sidebar.manifest.js +3 -0
  83. package/dist/shared/bricks/manifests/social-links.manifest.d.ts +40 -76
  84. package/dist/shared/bricks/manifests/social-links.manifest.d.ts.map +1 -1
  85. package/dist/shared/bricks/manifests/social-links.manifest.js +2 -2
  86. package/dist/shared/bricks/manifests/tests/header.manifest.test.d.ts +2 -0
  87. package/dist/shared/bricks/manifests/tests/header.manifest.test.d.ts.map +1 -0
  88. package/dist/shared/bricks/manifests/text.manifest.d.ts +87 -118
  89. package/dist/shared/bricks/manifests/text.manifest.d.ts.map +1 -1
  90. package/dist/shared/bricks/manifests/text.manifest.js +2 -2
  91. package/dist/shared/bricks/manifests/video.manifest.d.ts +40 -78
  92. package/dist/shared/bricks/manifests/video.manifest.d.ts.map +1 -1
  93. package/dist/shared/bricks/manifests/video.manifest.js +2 -2
  94. package/dist/shared/bricks/props/_docs-common-styles.d.ts +59 -0
  95. package/dist/shared/bricks/props/_docs-common-styles.d.ts.map +1 -0
  96. package/dist/shared/bricks/props/_docs-common-styles.js +3 -0
  97. package/dist/shared/bricks/props/_style-presets.d.ts +18 -0
  98. package/dist/shared/bricks/props/_style-presets.d.ts.map +1 -0
  99. package/dist/shared/bricks/props/_style-presets.js +3 -0
  100. package/dist/shared/bricks/props/align.d.ts +15 -0
  101. package/dist/shared/bricks/props/align.d.ts.map +1 -0
  102. package/dist/shared/bricks/props/align.js +3 -0
  103. package/dist/shared/bricks/props/background.d.ts +23 -0
  104. package/dist/shared/bricks/props/background.d.ts.map +1 -0
  105. package/dist/shared/bricks/props/background.js +3 -0
  106. package/dist/shared/bricks/props/boolean.d.ts +4 -0
  107. package/dist/shared/bricks/props/boolean.d.ts.map +1 -0
  108. package/dist/shared/bricks/props/boolean.js +3 -0
  109. package/dist/shared/bricks/props/border.d.ts +27 -0
  110. package/dist/shared/bricks/props/border.d.ts.map +1 -0
  111. package/dist/shared/bricks/props/border.js +3 -0
  112. package/dist/shared/bricks/props/common.d.ts +5 -39
  113. package/dist/shared/bricks/props/common.d.ts.map +1 -1
  114. package/dist/shared/bricks/props/common.js +2 -2
  115. package/dist/shared/bricks/props/container.d.ts +73 -0
  116. package/dist/shared/bricks/props/container.d.ts.map +1 -0
  117. package/dist/shared/bricks/props/container.js +3 -0
  118. package/dist/shared/bricks/props/datasource.d.ts +18 -0
  119. package/dist/shared/bricks/props/datasource.d.ts.map +1 -0
  120. package/dist/shared/bricks/props/datasource.js +3 -0
  121. package/dist/shared/bricks/props/effects.d.ts +39 -0
  122. package/dist/shared/bricks/props/effects.d.ts.map +1 -0
  123. package/dist/shared/bricks/props/effects.js +3 -0
  124. package/dist/shared/bricks/props/helpers.d.ts +29 -0
  125. package/dist/shared/bricks/props/helpers.d.ts.map +1 -0
  126. package/dist/shared/bricks/props/helpers.js +3 -0
  127. package/dist/shared/bricks/props/image.d.ts +15 -0
  128. package/dist/shared/bricks/props/image.d.ts.map +1 -0
  129. package/dist/shared/bricks/props/image.js +3 -0
  130. package/dist/shared/bricks/props/number.d.ts +6 -0
  131. package/dist/shared/bricks/props/number.d.ts.map +1 -0
  132. package/dist/shared/bricks/props/number.js +3 -0
  133. package/dist/shared/bricks/props/padding.d.ts +4 -0
  134. package/dist/shared/bricks/props/padding.d.ts.map +1 -0
  135. package/dist/shared/bricks/props/padding.js +3 -0
  136. package/dist/shared/bricks/props/position.d.ts +6 -0
  137. package/dist/shared/bricks/props/position.d.ts.map +1 -0
  138. package/dist/shared/bricks/props/position.js +3 -0
  139. package/dist/shared/bricks/props/string.d.ts +11 -0
  140. package/dist/shared/bricks/props/string.d.ts.map +1 -0
  141. package/dist/shared/bricks/props/string.js +3 -0
  142. package/dist/shared/bricks/props/tests/align.test.d.ts +2 -0
  143. package/dist/shared/bricks/props/tests/align.test.d.ts.map +1 -0
  144. package/dist/shared/bricks/props/tests/background.test.d.ts +2 -0
  145. package/dist/shared/bricks/props/tests/background.test.d.ts.map +1 -0
  146. package/dist/shared/bricks/props/tests/border.test.d.ts +2 -0
  147. package/dist/shared/bricks/props/tests/border.test.d.ts.map +1 -0
  148. package/dist/shared/bricks/props/tests/container.test.d.ts +2 -0
  149. package/dist/shared/bricks/props/tests/container.test.d.ts.map +1 -0
  150. package/dist/shared/bricks/props/tests/effects.test.d.ts +2 -0
  151. package/dist/shared/bricks/props/tests/effects.test.d.ts.map +1 -0
  152. package/dist/shared/bricks/props/tests/helpers.test.d.ts +2 -0
  153. package/dist/shared/bricks/props/tests/helpers.test.d.ts.map +1 -0
  154. package/dist/shared/bricks/props/tests/image.test.d.ts +2 -0
  155. package/dist/shared/bricks/props/tests/image.test.d.ts.map +1 -0
  156. package/dist/shared/bricks/props/tests/padding.d.ts +2 -0
  157. package/dist/shared/bricks/props/tests/padding.d.ts.map +1 -0
  158. package/dist/shared/bricks/props/tests/string.test.d.ts +2 -0
  159. package/dist/shared/bricks/props/tests/string.test.d.ts.map +1 -0
  160. package/dist/shared/bricks/props/text.d.ts +14 -0
  161. package/dist/shared/bricks/props/text.d.ts.map +1 -0
  162. package/dist/shared/bricks/props/text.js +3 -0
  163. package/dist/shared/bricks/props/types.d.ts +43 -0
  164. package/dist/shared/bricks/props/types.d.ts.map +1 -0
  165. package/dist/shared/bricks/props/types.js +2 -0
  166. package/dist/shared/bricks.d.ts +88 -1527
  167. package/dist/shared/bricks.d.ts.map +1 -1
  168. package/dist/shared/bricks.js +2 -2
  169. package/dist/shared/chunk-3CY6AZG7.js +3 -0
  170. package/dist/shared/chunk-3YDMOB7M.js +3 -0
  171. package/dist/shared/{chunk-X7ABR5GQ.js → chunk-6GYFUI5C.js} +2 -2
  172. package/dist/shared/chunk-6I4PY5WS.js +3 -0
  173. package/dist/shared/{chunk-KXVIWTJN.js → chunk-7XTKGW6E.js} +1 -1
  174. package/dist/shared/chunk-AZ63RF3K.js +3 -0
  175. package/dist/shared/chunk-BK6LBWDI.js +3 -0
  176. package/dist/shared/chunk-BMDB2V7J.js +3 -0
  177. package/dist/shared/chunk-CSBX76ZN.js +3 -0
  178. package/dist/shared/chunk-DAPQ4JPP.js +3 -0
  179. package/dist/shared/chunk-EFJQECVB.js +3 -0
  180. package/dist/shared/chunk-F2ZVIFHO.js +3 -0
  181. package/dist/shared/chunk-FGU4BGP4.js +3 -0
  182. package/dist/shared/chunk-H6L4KRCJ.js +3 -0
  183. package/dist/shared/chunk-HIZPJNEM.js +3 -0
  184. package/dist/shared/chunk-HW5TY2QW.js +3 -0
  185. package/dist/shared/chunk-IWSVY2VC.js +3 -0
  186. package/dist/shared/chunk-JVDUEZYO.js +3 -0
  187. package/dist/shared/chunk-KB4HY432.js +3 -0
  188. package/dist/shared/chunk-LDOM2LJF.js +3 -0
  189. package/dist/shared/chunk-NFU5BF6G.js +3 -0
  190. package/dist/shared/{chunk-A3ACTIE3.js → chunk-NNVPTAAH.js} +1 -1
  191. package/dist/shared/chunk-P5FVZ5PL.js +3 -0
  192. package/dist/shared/chunk-P7WL7MYK.js +3 -0
  193. package/dist/shared/chunk-PD7P5KSV.js +3 -0
  194. package/dist/shared/chunk-PJ6HA55L.js +3 -0
  195. package/dist/shared/chunk-PSSJMWGU.js +3 -0
  196. package/dist/shared/chunk-Q4MXTCE4.js +8 -0
  197. package/dist/shared/chunk-QRBMK5UX.js +3 -0
  198. package/dist/shared/chunk-RBYYMUOZ.js +3 -0
  199. package/dist/shared/chunk-SO5M7CYA.js +3 -0
  200. package/dist/shared/chunk-SQVL4WSX.js +3 -0
  201. package/dist/shared/chunk-TQ23UATQ.js +3 -0
  202. package/dist/shared/chunk-U44NTSIO.js +3 -0
  203. package/dist/shared/chunk-U4R5EGBK.js +3 -0
  204. package/dist/shared/chunk-WJ5CDDXW.js +3 -0
  205. package/dist/shared/chunk-WOEBR25A.js +3 -0
  206. package/dist/shared/chunk-WPTVLIYS.js +3 -0
  207. package/dist/shared/{chunk-XGI243DO.js → chunk-WXKRIUTA.js} +1 -1
  208. package/dist/shared/chunk-XBX6II3M.js +3 -0
  209. package/dist/shared/chunk-XEQ2XZLQ.js +3 -0
  210. package/dist/shared/chunk-XGCBIXOO.js +3 -0
  211. package/dist/shared/chunk-XYID4ZEA.js +3 -0
  212. package/dist/shared/chunk-ZWVJMSTT.js +3 -0
  213. package/dist/shared/datarecords/external/google/oauth/config.js +1 -1
  214. package/dist/shared/datarecords/types.d.ts +2 -2
  215. package/dist/shared/datarecords/types.js +1 -1
  216. package/dist/shared/datarecords.js +1 -1
  217. package/dist/shared/datasources/external/meta/oauth/config.js +2 -2
  218. package/dist/shared/datasources/external/tiktok/oauth/config.js +2 -2
  219. package/dist/shared/datasources/external/youtube/oauth/config.js +2 -2
  220. package/dist/shared/datasources/internal/job-board/schema.d.ts +87 -0
  221. package/dist/shared/datasources/internal/job-board/schema.d.ts.map +1 -0
  222. package/dist/shared/datasources/schemas.js +2 -2
  223. package/dist/shared/datasources/types.d.ts +2 -2
  224. package/dist/shared/datasources/types.js +2 -2
  225. package/dist/shared/datasources.js +1 -1
  226. package/dist/shared/env.d.ts +6 -6
  227. package/dist/shared/env.d.ts.map +1 -1
  228. package/dist/shared/env.js +1 -1
  229. package/dist/shared/errors.js +1 -1
  230. package/dist/shared/layout-constants.js +2 -2
  231. package/dist/shared/oauth.js +2 -2
  232. package/dist/shared/page.d.ts +155 -2331
  233. package/dist/shared/page.d.ts.map +1 -1
  234. package/dist/shared/page.js +2 -2
  235. package/dist/shared/responsive.js +1 -1
  236. package/dist/shared/template.d.ts +31 -0
  237. package/dist/shared/template.d.ts.map +1 -0
  238. package/dist/shared/template.js +3 -0
  239. package/dist/shared/tests/test-config.d.ts +1 -1
  240. package/dist/shared/tests/test-config.d.ts.map +1 -1
  241. package/dist/shared/theme.d.ts.map +1 -1
  242. package/dist/shared/theme.js +2 -2
  243. package/dist/shared/themes/all-themes.js +1 -1
  244. package/dist/shared/themes/color-system.d.ts +3 -5
  245. package/dist/shared/themes/color-system.d.ts.map +1 -1
  246. package/dist/shared/themes/color-system.js +2 -2
  247. package/dist/shared/utils/canvas-data-uri.d.ts +2 -0
  248. package/dist/shared/utils/canvas-data-uri.d.ts.map +1 -0
  249. package/dist/shared/utils/invariant.js +2 -2
  250. package/dist/shared/utils/merge.d.ts +2 -0
  251. package/dist/shared/utils/merge.d.ts.map +1 -0
  252. package/dist/shared/utils/merge.js +3 -0
  253. package/dist/shared/utils/object-hash.d.ts +2 -0
  254. package/dist/shared/utils/object-hash.d.ts.map +1 -0
  255. package/dist/shared/utils/try-catch.d.ts +7 -0
  256. package/dist/shared/utils/try-catch.d.ts.map +1 -0
  257. package/package.json +6 -5
  258. package/dist/shared/bricks/manifests/images-wall.manifest.d.ts +0 -95
  259. package/dist/shared/bricks/manifests/images-wall.manifest.d.ts.map +0 -1
  260. package/dist/shared/bricks/manifests/images-wall.manifest.js +0 -3
  261. package/dist/shared/bricks/manifests/loop.manifest.d.ts +0 -105
  262. package/dist/shared/bricks/manifests/loop.manifest.d.ts.map +0 -1
  263. package/dist/shared/bricks/manifests/loop.manifest.js +0 -3
  264. package/dist/shared/bricks/props/style-presets.d.ts +0 -10
  265. package/dist/shared/bricks/props/style-presets.d.ts.map +0 -1
  266. package/dist/shared/bricks/props/style-presets.js +0 -3
  267. package/dist/shared/bricks/props/style-props.d.ts +0 -90
  268. package/dist/shared/bricks/props/style-props.d.ts.map +0 -1
  269. package/dist/shared/bricks/props/style-props.js +0 -3
  270. package/dist/shared/chunk-3PPIJUXG.js +0 -32
  271. package/dist/shared/chunk-3T2OW4FE.js +0 -14
  272. package/dist/shared/chunk-5PE57DBS.js +0 -15
  273. package/dist/shared/chunk-6G2OUITX.js +0 -3
  274. package/dist/shared/chunk-6PCNIIO5.js +0 -3
  275. package/dist/shared/chunk-AVHF4FLR.js +0 -3
  276. package/dist/shared/chunk-G42AE2ZC.js +0 -13
  277. package/dist/shared/chunk-G4K7GJZO.js +0 -3
  278. package/dist/shared/chunk-GBKDJDGW.js +0 -3
  279. package/dist/shared/chunk-GUOQD446.js +0 -22
  280. package/dist/shared/chunk-MEMG6QPT.js +0 -3
  281. package/dist/shared/chunk-NYPOZ5T2.js +0 -13
  282. package/dist/shared/chunk-PXAK7ZJ3.js +0 -3
  283. package/dist/shared/chunk-PZCWP77P.js +0 -3
  284. package/dist/shared/chunk-QQ7YEIHB.js +0 -3
  285. package/dist/shared/chunk-RRTB52G4.js +0 -9
  286. package/dist/shared/chunk-UIKVMZNI.js +0 -13
  287. package/dist/shared/chunk-WGWJHVOE.js +0 -20
  288. package/dist/shared/chunk-WX4P2YIR.js +0 -11
  289. package/dist/shared/chunk-WXSQ2ZEK.js +0 -16
  290. package/dist/shared/chunk-XS5WCEA6.js +0 -16
  291. package/dist/shared/chunk-Y3TOGUNY.js +0 -9
  292. package/dist/shared/chunk-YSMFNK4R.js +0 -20
  293. package/dist/shared/chunk-YXGFGLKH.js +0 -16
  294. package/dist/shared/chunk-ZDZXB45C.js +0 -7
  295. package/dist/shared/chunk-ZWYM64YA.js +0 -8
  296. package/dist/shared/chunk-ZYVXEGAM.js +0 -11
@@ -1,3 +1,3 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- var c="enpage-cli";var N=process.env.PUBLIC_ENPAGE_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",I=process.env.PUBLIC_ENPAGE_API_BASE_URL??"https://api.enpage.co",P=process.env.PUBLIC_ENPAGE_FRONTEND_BASE_URL??"https://enpage.co";import p from"conf";import r from"node:path";import a from"node:crypto";import o from"node:fs";import{fileURLToPath as _}from"node:url";function i(){let e;if(process.env.npm_config_user_agent){let t=process.env.npm_config_user_agent.split(" ")[0];e=t.slice(0,t.lastIndexOf("/"))}return e||(console.log("Warning: could not detect package manager"),e="npm"),e}import u from"chalk";var m=_(new URL(".",import.meta.url)),E=g(),d=new p({projectName:c,encryptionKey:E,clearInvalidConfig:!0});function R(){let e=d.get("access_token");if(!e){let t=i();throw new Error(`Access token not found. Please run ${u.cyan(`${t} run enpage:login`)} to authenticate.`)}return e}function f(){let e=m;for(;e!==r.parse(e).root;){let t=r.join(e,"node_modules");if(o.existsSync(t))return t;e=r.dirname(e)}return null}function g(){let e=f();if(!e)throw new Error("Could not find nearest node_modules directory.");let t=r.join(e,".enpage-tmp");o.existsSync(t)||o.mkdirSync(t,{recursive:!0,mode:448});let n=r.join(t,".enpage-key");if(!o.existsSync(n)){let s=a.randomBytes(32).toString("hex");return o.writeFileSync(n,s,{mode:384,flush:!0}),s}return o.readFileSync(n,"utf8")}export{d as accessStore,R as getTokenOrThrow};
3
+ var c="upstart-cli";var I=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",T=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",P=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg";import p from"conf";import r from"node:path";import a from"node:crypto";import o from"node:fs";import{fileURLToPath as _}from"node:url";function i(){let e;if(process.env.npm_config_user_agent){let t=process.env.npm_config_user_agent.split(" ")[0];e=t.slice(0,t.lastIndexOf("/"))}return e||(console.log("Warning: could not detect package manager"),e="npm"),e}import u from"chalk";var m=_(new URL(".",import.meta.url)),d=l(),f=new p({projectName:c,encryptionKey:d,clearInvalidConfig:!0});function k(){let e=f.get("access_token");if(!e){let t=i();throw new Error(`Access token not found. Please run ${u.cyan(`${t} run enpage:login`)} to authenticate.`)}return e}function g(){let e=m;for(;e!==r.parse(e).root;){let t=r.join(e,"node_modules");if(o.existsSync(t))return t;e=r.dirname(e)}return null}function l(){let e=g();if(!e)throw new Error("Could not find nearest node_modules directory.");let t=r.join(e,".enpage-tmp");o.existsSync(t)||o.mkdirSync(t,{recursive:!0,mode:448});let n=r.join(t,".enpage-key");if(!o.existsSync(n)){let s=a.randomBytes(32).toString("hex");return o.writeFileSync(n,s,{mode:384,flush:!0}),s}return o.readFileSync(n,"utf8")}export{f as accessStore,k as getTokenOrThrow};
@@ -1,2 +1,2 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
@@ -1,3 +1,3 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
3
  function n(){let r;if(process.env.npm_config_user_agent){let e=process.env.npm_config_user_agent.split(" ")[0];r=e.slice(0,e.lastIndexOf("/"))}return r||(console.log("Warning: could not detect package manager"),r="npm"),r}function t(r){return`[${r.error}]${r.error_description?`: ${r.error_description}`:""}`}export{t as formatAPIError,n as getPackageManager};
@@ -1,5 +1,5 @@
1
1
  import { type Logger } from "./logger";
2
- import type { TemplateConfig } from "~/shared/page";
2
+ import type { TemplateConfig } from "~/shared/template";
3
3
  export declare function loadConfigFromJsFile(configPath: string, logger?: {
4
4
  success: (message: string, options?: import("vite").LogOptions) => void;
5
5
  error: (message: string, options?: import("vite").LogOptions) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/node/shared/config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAA2B,MAAM,UAAU,CAAC;AAGhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,EAClB,MAAM;;;;;;;;;;CAAgB,GACrB,OAAO,CAAC,cAAc,CAAC,CA8BzB;AAED,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,CAM/F;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,kBAmB5E"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/node/shared/config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAA2B,MAAM,UAAU,CAAC;AAGhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,EAClB,MAAM;;;;;;;;;;CAAgB,GACrB,OAAO,CAAC,cAAc,CAAC,CAgCzB;AAED,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,CAM/F;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,kBAmB5E"}
@@ -1,13 +1,13 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{Type as e}from"@sinclair/typebox";var m=e.Object({id:e.Optional(e.String({title:"Template ID",description:"A unique identifier for the template. Can be any string, but should be unique."})),name:e.String({title:"Template Name"}),description:e.Optional(e.String({title:"Show template description"})),readme:e.Optional(e.Record(e.RegExp(/^[a-z]{2}$/),e.String(),{title:"Readme texts.",description:"A dictionary of readme files for different languages (iso 2 letters code). Currently on supported for 'en' and 'fr'."})),tags:e.Optional(e.Array(e.String(),{title:"Tags"})),author:e.Optional(e.String({title:"Author name"})),thumbnail:e.Optional(e.String({title:"Thumbnail",description:"A URL to the thumbnail image for the template."})),homepage:e.Optional(e.String({title:"Homepage",description:"A URL to the homepage of the template."}))});import d from"node:fs";import{readFile as x}from"node:fs/promises";import L from"fast-glob";import{createLogger as b}from"vite";var g="0.0.78";import n from"chalk";function v(r,i,a=!1){let t=b(r==="debug"?"info":r,{prefix:"[enpage]",allowClearScreen:i});return a&&t.info(n.hex("#7270c6").bold(`\u{1F680} Enpage v${g}
4
- `)),{...t,success:(o,s)=>t.info(n.green(o),s),error:(o,s)=>t.error(n.red(o),s),warn:(o,s)=>t.warn(n.yellow(o),s),warnOnce:(o,s)=>t.warnOnce(n.yellow(o),s),debug:(o,s)=>{r==="debug"&&t.info(n.gray(o),s)}}}var u=v();import{fromError as O}from"zod-validation-error";import{basename as f,dirname as w,extname as S}from"node:path";async function P(r,i=u){d.existsSync(r)||(i.error(`\u{1F534} No enpage.config.js found!
3
+ import{Type as e}from"@sinclair/typebox";var m=e.Object({id:e.Optional(e.String({title:"Template ID",description:"A unique identifier for the template. Can be any string, but should be unique."})),name:e.String({title:"Template Name"}),description:e.Optional(e.String({title:"Show template description"})),readme:e.Optional(e.Record(e.RegExp(/^[a-z]{2}$/),e.String(),{title:"Readme texts.",description:"A dictionary of readme files for different languages (iso 2 letters code). Currently on supported for 'en' and 'fr'."})),tags:e.Optional(e.Array(e.String(),{title:"Tags"})),author:e.Optional(e.String({title:"Author name"})),thumbnail:e.Optional(e.String({title:"Thumbnail",description:"A URL to the thumbnail image for the template."})),homepage:e.Optional(e.String({title:"Homepage",description:"A URL to the homepage of the template."}))});import d from"node:fs";import{readFile as x}from"node:fs/promises";import L from"fast-glob";import{createLogger as b}from"vite";var g="0.0.80";import n from"chalk";function v(r,i,a=!1){let t=b(r==="debug"?"info":r,{prefix:"[upstart]",allowClearScreen:i});return a&&t.info(n.hex("#7270c6").bold(`\u{1F680} Upstart v${g}
4
+ `)),{...t,success:(s,o)=>t.info(n.green(s),o),error:(s,o)=>t.error(n.red(s),o),warn:(s,o)=>t.warn(n.yellow(s),o),warnOnce:(s,o)=>t.warnOnce(n.yellow(s),o),debug:(s,o)=>{r==="debug"&&t.info(n.gray(s),o)}}}var u=v();import{fromError as O}from"zod-validation-error";import{basename as f,dirname as w,extname as S}from"node:path";async function U(r,i=u){d.existsSync(r)||(i.error(`\u{1F534} No enpage.config.js found!
5
5
  Your project must have an enpage.config.js file in the root directory.
6
6
 
7
- `),process.exit(1));let a=await import(r),t=w(r),o={},s=await L(["README.enpage.md","README.enpage.*.md"],{cwd:t,onlyFiles:!0,absolute:!0,caseSensitiveMatch:!1});for(let p of s){let y=f(p,".md"),l=S(y),c=(l===".enpage"?"en":l.substring(1)).toLowerCase();i.debug(`Found template readme file (${c}): ${f(p)}`),o[c]=await x(p,"utf-8")}return a.manifest.readme=o,a}function B(r,i){return d.existsSync(r)||(i.error(`\u{1F534} No enpage.manifest.json found!
7
+ `),process.exit(1));let a=await import(r),t=w(r),s={},o=await L(["README.enpage.md","README.enpage.*.md"],{cwd:t,onlyFiles:!0,absolute:!0,caseSensitiveMatch:!1});for(let p of o){let y=f(p,".md"),c=S(y),l=(c===".enpage"?"en":c.substring(1)).toLowerCase();i.debug(`Found template readme file (${l}): ${f(p)}`),s[l]=await x(p,"utf-8")}return a.manifest&&(a.manifest.readme=s),a}function P(r,i){return d.existsSync(r)||(i.error(`\u{1F534} No enpage.manifest.json found!
8
8
  You may want to 'build' your template.
9
9
 
10
- `),process.exit(1)),JSON.parse(d.readFileSync(r,"utf-8"))}function H(r,i){for(let t in r.datasources)if(r.datasources[t].provider==="json"&&!r.datasources[t].sampleData)throw i.error(`\u{1F534} Error: Datasource "${t}" is missing sample data - nothing will be rendered during development! Please check your enpage.config.js file and add a "sampleData" key to your ${t} datasource.`),new Error(`Missing sample data for datasource "${t}"`);let a=m.safeParse(r.manifest);if(!a.success){i.error(`\u{1F534} Error: template manifest is invalid. Check your call to defineManifest().
10
+ `),process.exit(1)),JSON.parse(d.readFileSync(r,"utf-8"))}function B(r,i){for(let t in r.datasources)if(r.datasources[t].provider==="json"&&!r.datasources[t].sampleData)throw i.error(`\u{1F534} Error: Datasource "${t}" is missing sample data - nothing will be rendered during development! Please check your enpage.config.js file and add a "sampleData" key to your ${t} datasource.`),new Error(`Missing sample data for datasource "${t}"`);let a=m.safeParse(r.manifest);if(!a.success){i.error(`\u{1F534} Error: template manifest is invalid. Check your call to defineManifest().
11
11
  `);let t=O(a.error);i.error(`Hint: ${t.toString()}
12
12
 
13
- `),process.exit(1)}return r}export{P as loadConfigFromJsFile,B as loadConfigFromManifestFile,H as validateTemplateConfig};
13
+ `),process.exit(1)}return r}export{U as loadConfigFromJsFile,P as loadConfigFromManifestFile,B as validateTemplateConfig};
@@ -1,6 +1,6 @@
1
1
  import { type LogLevel, type LogOptions, type Logger as BaseLogger } from "vite";
2
- type EnpageLoggerLevel = LogLevel | "debug";
3
- export declare function createLogger(level?: EnpageLoggerLevel, allowClearScreen?: boolean, showVersion?: boolean): {
2
+ type UpstartLoggerLevel = LogLevel | "debug";
3
+ export declare function createLogger(level?: UpstartLoggerLevel, allowClearScreen?: boolean, showVersion?: boolean): {
4
4
  success: (message: string, options?: LogOptions) => void;
5
5
  error: (message: string, options?: LogOptions) => void;
6
6
  warn: (message: string, options?: LogOptions) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/node/shared/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,MAAM,IAAI,UAAU,EAC1B,MAAM,MAAM,CAAC;AAId,KAAK,iBAAiB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE5C,wBAAgB,YAAY,CAAC,KAAK,CAAC,EAAE,iBAAiB,EAAE,gBAAgB,CAAC,EAAE,OAAO,EAAE,WAAW,UAAQ;uBAahF,MAAM,YAAY,UAAU;qBAC9B,MAAM,YAAY,UAAU;oBAC7B,MAAM,YAAY,UAAU;wBACxB,MAAM,YAAY,UAAU;qBAC/B,MAAM,YAAY,UAAU;;;;;EAMhD;AAED,eAAO,MAAM,MAAM;uBAZI,MAAM,YAAY,UAAU;qBAC9B,MAAM,YAAY,UAAU;oBAC7B,MAAM,YAAY,UAAU;wBACxB,MAAM,YAAY,UAAU;qBAC/B,MAAM,YAAY,UAAU;;;;;CAQb,CAAC;AAErC,MAAM,MAAM,MAAM,GAAG,UAAU,GAAG;IAChC,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACzD,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CACxD,CAAC"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/node/shared/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,MAAM,IAAI,UAAU,EAC1B,MAAM,MAAM,CAAC;AAId,KAAK,kBAAkB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE7C,wBAAgB,YAAY,CAAC,KAAK,CAAC,EAAE,kBAAkB,EAAE,gBAAgB,CAAC,EAAE,OAAO,EAAE,WAAW,UAAQ;uBAajF,MAAM,YAAY,UAAU;qBAC9B,MAAM,YAAY,UAAU;oBAC7B,MAAM,YAAY,UAAU;wBACxB,MAAM,YAAY,UAAU;qBAC/B,MAAM,YAAY,UAAU;;;;;EAMhD;AAED,eAAO,MAAM,MAAM;uBAZI,MAAM,YAAY,UAAU;qBAC9B,MAAM,YAAY,UAAU;oBAC7B,MAAM,YAAY,UAAU;wBACxB,MAAM,YAAY,UAAU;qBAC/B,MAAM,YAAY,UAAU;;;;;CAQb,CAAC;AAErC,MAAM,MAAM,MAAM,GAAG,UAAU,GAAG;IAChC,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACzD,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CACxD,CAAC"}
@@ -1,4 +1,4 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{createLogger as d}from"vite";var i="0.0.78";import r from"chalk";function g(o,a,n=!1){let s=d(o==="debug"?"info":o,{prefix:"[enpage]",allowClearScreen:a});return n&&s.info(r.hex("#7270c6").bold(`\u{1F680} Enpage v${i}
4
- `)),{...s,success:(e,t)=>s.info(r.green(e),t),error:(e,t)=>s.error(r.red(e),t),warn:(e,t)=>s.warn(r.yellow(e),t),warnOnce:(e,t)=>s.warnOnce(r.yellow(e),t),debug:(e,t)=>{o==="debug"&&s.info(r.gray(e),t)}}}var y=g();export{g as createLogger,y as logger};
3
+ import{createLogger as d}from"vite";var i="0.0.80";import r from"chalk";function c(o,a,n=!1){let s=d(o==="debug"?"info":o,{prefix:"[upstart]",allowClearScreen:a});return n&&s.info(r.hex("#7270c6").bold(`\u{1F680} Upstart v${i}
4
+ `)),{...s,success:(e,t)=>s.info(r.green(e),t),error:(e,t)=>s.error(r.red(e),t),warn:(e,t)=>s.warn(r.yellow(e),t),warnOnce:(e,t)=>s.warnOnce(r.yellow(e),t),debug:(e,t)=>{o==="debug"&&s.info(r.gray(e),t)}}}var y=c();export{c as createLogger,y as logger};
@@ -1,5 +1,6 @@
1
1
  import Ajv, { type ErrorObject } from "ajv";
2
2
  export type { JSONSchemaType, AnySchemaObject, SchemaObject, JSONType } from "ajv";
3
3
  export declare const ajv: Ajv;
4
+ export declare const jsonStringsSupportedFormats: readonly ["date-time", "time", "date", "email", "hostname", "ipv4", "ipv6", "uri", "uri-reference", "uuid", "uri-template", "json-pointer", "relative-json-pointer", "regex"];
4
5
  export declare function serializeAjvErrors(errors: ErrorObject[] | null | undefined): string;
5
6
  //# sourceMappingURL=ajv.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ajv.d.ts","sourceRoot":"","sources":["../../src/shared/ajv.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,EAAE,EAAE,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;AAG5C,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAEnF,eAAO,MAAM,GAAG,KAGd,CAAC;AA0BH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAcnF"}
1
+ {"version":3,"file":"ajv.d.ts","sourceRoot":"","sources":["../../src/shared/ajv.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,EAAE,EAAE,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;AAG5C,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAEnF,eAAO,MAAM,GAAG,KAGd,CAAC;AAEH,eAAO,MAAM,2BAA2B,+KAe9B,CAAC;AAWX,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAcnF"}
@@ -1,3 +1,3 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a,b}from"./chunk-6PCNIIO5.js";export{a as ajv,b as serializeAjvErrors};
3
+ import{a,b,c}from"./chunk-ZWVJMSTT.js";export{a as ajv,b as jsonStringsSupportedFormats,c as serializeAjvErrors};
@@ -1,3 +1,3 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
3
  function t(){window.upstartQueue=window.upstartQueue||[],document.addEventListener("visibilitychange",function(){if(document.visibilityState==="hidden"){let e=JSON.stringify(window.upstartQueue);navigator.sendBeacon?.(window.location.pathname,e)?(console.debug("beacon sent",e),window.upstartQueue=[]):console.debug("beacon failed",e)}})}export{t as init};
@@ -1,3 +1,3 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
3
  function o(t,a={}){let e={e:t,t:Date.now(),d:a};window.upstartQueue.push(e)}document.addEventListener("click",function(t){let a=t.target;o("click",{buttonId:a.id})},!0);export{o as track};
@@ -1,2 +1,2 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
@@ -1,4 +1,4 @@
1
- import { type StringOptions, type NumberOptions, type SchemaOptions, type ObjectOptions, type TProperties, type Static } from "@sinclair/typebox";
1
+ import { type StringOptions, type NumberOptions, type SchemaOptions, type ObjectOptions, type TProperties, type Static, type TObject } from "@sinclair/typebox";
2
2
  import type { ElementColor } from "./themes/color-system";
3
3
  import type { JSONSchemaType } from "ajv";
4
4
  type EnumOption = {
@@ -21,7 +21,11 @@ type GeoPoint = {
21
21
  lng: number;
22
22
  name?: string;
23
23
  };
24
- export declare function defineAttributes(attrs: TProperties): JSONSchemaType<Attributes>;
24
+ export declare function defineAttributes(attrs: TProperties): TObject<TProperties>;
25
+ /**
26
+ * Retuns the custom attributes schema merged with the default attributes schema
27
+ */
28
+ export declare function processAttributesSchema(customAttributes: TObject): TObject;
25
29
  export type { JSONSchemaType };
26
30
  export type AttributesSchema = JSONSchemaType<Attributes>;
27
31
  export declare const attr: {
@@ -67,13 +71,13 @@ export declare const attr: {
67
71
  /**
68
72
  * Define a geolocation
69
73
  */
70
- geolocation(name: string, defaultValue: GeoPoint, opts?: AttributeOptions<Omit<ObjectOptions, "title" | "default">>): import("@sinclair/typebox").TObject<{
74
+ geolocation(name: string, defaultValue: GeoPoint, opts?: AttributeOptions<Omit<ObjectOptions, "title" | "default">>): TObject<{
71
75
  lat: import("@sinclair/typebox").TNumber;
72
76
  lng: import("@sinclair/typebox").TNumber;
73
77
  name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
74
78
  }>;
75
79
  };
76
- export declare const defaultAttributesSchema: import("@sinclair/typebox").TObject<{
80
+ export declare const defaultAttributesSchema: TObject<{
77
81
  $pageLanguage: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<string>[]>;
78
82
  $pageOgImage: import("@sinclair/typebox").TString;
79
83
  $robotsIndexing: import("@sinclair/typebox").TBoolean;
@@ -83,21 +87,22 @@ export declare const defaultAttributesSchema: import("@sinclair/typebox").TObjec
83
87
  $pageDescription: import("@sinclair/typebox").TString;
84
88
  $pageKeywords: import("@sinclair/typebox").TString;
85
89
  $pageLastUpdated: import("@sinclair/typebox").TString;
86
- $pagePadding: import("@sinclair/typebox").TObject<{
87
- vertical: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<string>[]>;
88
- horizontal: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<string>[]>;
89
- }>;
90
- $pageWidth: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<string>[]>;
91
- $background: import("@sinclair/typebox").TObject<{
92
- repeat: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"no-repeat">, import("@sinclair/typebox").TLiteral<"repeat">, import("@sinclair/typebox").TLiteral<"repeat-x">, import("@sinclair/typebox").TLiteral<"repeat-y">, import("@sinclair/typebox").TLiteral<"space">, import("@sinclair/typebox").TLiteral<"round">]>>;
90
+ $bodyBackground: TObject<{
93
91
  color: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
92
+ image: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
93
+ repeat: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"no-repeat">, import("@sinclair/typebox").TLiteral<"repeat">, import("@sinclair/typebox").TLiteral<"repeat-x">, import("@sinclair/typebox").TLiteral<"repeat-y">, import("@sinclair/typebox").TLiteral<"space">, import("@sinclair/typebox").TLiteral<"round">]>>;
94
94
  size: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"auto">, import("@sinclair/typebox").TLiteral<"cover">, import("@sinclair/typebox").TLiteral<"contain">]>>;
95
+ }>;
96
+ $pageBackground: TObject<{
97
+ color: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
95
98
  image: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
99
+ repeat: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"no-repeat">, import("@sinclair/typebox").TLiteral<"repeat">, import("@sinclair/typebox").TLiteral<"repeat-x">, import("@sinclair/typebox").TLiteral<"repeat-y">, import("@sinclair/typebox").TLiteral<"space">, import("@sinclair/typebox").TLiteral<"round">]>>;
100
+ size: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"auto">, import("@sinclair/typebox").TLiteral<"cover">, import("@sinclair/typebox").TLiteral<"contain">]>>;
96
101
  }>;
97
102
  $textColor: import("@sinclair/typebox").TString;
98
103
  $siteHeadTags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
99
104
  $siteBodyTags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
100
105
  }>;
101
- export type Attributes = Static<typeof defaultAttributesSchema> & Record<string, unknown>;
102
- export declare function resolveAttributes(attributesSchema: JSONSchemaType<Attributes>, initialData?: Record<string, unknown>): Attributes;
106
+ export type Attributes<T extends Record<string, unknown> = Record<string, unknown>> = Static<typeof defaultAttributesSchema> & T;
107
+ export declare function resolveAttributes(customAttrsSchema: TObject, initialData?: Record<string, unknown>): Attributes<Static<typeof customAttrsSchema>>;
103
108
  //# sourceMappingURL=attributes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../src/shared/attributes.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,MAAM,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAK1C,KAAK,UAAU,GAAG;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MA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SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,MAAM,CAC1F,OAAO,uBAAuB,CAC/B,GACC,CAAC,CAAC;AAEJ,wBAAgB,iBAAiB,CAAC,iBAAiB,EAAE,OAAO,EAAE,WAAW,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAStF,UAAU,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAC5D"}
@@ -1,3 +1,3 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a,b,c,d}from"./chunk-AVHF4FLR.js";import"./chunk-6PCNIIO5.js";import"./chunk-MEMG6QPT.js";export{b as attr,c as defaultAttributesSchema,a as defineAttributes,d as resolveAttributes};
3
+ import{a,b,c,d,e}from"./chunk-P7WL7MYK.js";import"./chunk-ZWVJMSTT.js";import"./chunk-P5FVZ5PL.js";import"./chunk-BMDB2V7J.js";import"./chunk-PSSJMWGU.js";export{c as attr,d as defaultAttributesSchema,a as defineAttributes,b as processAttributesSchema,e as resolveAttributes};
@@ -1,68 +1,117 @@
1
- import { type Static, type TObject, type TProperties } from "@sinclair/typebox";
2
- export declare function defineBrickManifest<BType extends string, BTitle extends string, BIcon extends string, BDesc extends string, BProps extends TProperties>({ type, kind, title, description, preferredWidth, preferredHeight, minWidth, minHeight, maxWidth, icon, props, datasource, datarecord, isContainer, hideInLibrary, }: {
3
- type: BType;
4
- kind: string;
5
- title: BTitle;
6
- icon: BIcon;
7
- description: BDesc;
1
+ import type { TObject, TProperties, TArray, Static } from "@sinclair/typebox";
2
+ import type { FC } from "react";
3
+ import type { IconBaseProps } from "react-icons/lib";
4
+ type BrickKind = "brick" | "widget" | "container";
5
+ type BrickManifestProps<BProps extends TProperties, DSSchema extends TObject | TArray<TObject>> = {
6
+ type: string;
7
+ kind?: BrickKind;
8
+ name: string;
9
+ icon: string | FC<IconBaseProps>;
10
+ iconClassName?: string;
11
+ description?: string;
8
12
  minWidth?: {
9
13
  mobile: number;
10
14
  desktop: number;
11
15
  };
16
+ maxWidth?: {
17
+ mobile: number;
18
+ desktop: number;
19
+ };
12
20
  minHeight?: {
13
21
  mobile: number;
14
22
  desktop: number;
15
23
  };
16
- maxWidth?: {
24
+ maxHeight?: {
17
25
  mobile: number;
18
26
  desktop: number;
19
27
  };
20
- preferredWidth?: {
28
+ defaultWidth?: {
21
29
  mobile: number;
22
30
  desktop: number;
23
31
  };
24
- preferredHeight?: {
32
+ defaultHeight?: {
25
33
  mobile: number;
26
34
  desktop: number;
27
35
  };
28
36
  props: TObject<BProps>;
29
- datasource?: TObject;
30
- datarecord?: TObject;
37
+ presets?: Record<string, {
38
+ label: string;
39
+ previewClasses: string;
40
+ props: Partial<Static<TObject<BProps>>>;
41
+ }>;
42
+ datasource?: DSSchema;
31
43
  hideInLibrary?: boolean;
44
+ defaultInspectorTab?: "preset" | "style" | "content";
45
+ deletable?: boolean;
46
+ movable?: boolean;
47
+ repeatable?: boolean;
48
+ resizable?: boolean;
49
+ duplicatable?: boolean;
32
50
  isContainer?: boolean;
33
- }): TObject<{
34
- props: TObject<BProps>;
35
- datarecord?: TObject<TProperties> | undefined;
36
- datasource?: TObject<TProperties> | undefined;
37
- type: import("@sinclair/typebox").TLiteral<BType>;
38
- kind: import("@sinclair/typebox").TLiteral<string>;
39
- title: import("@sinclair/typebox").TLiteral<BTitle>;
40
- description: import("@sinclair/typebox").TLiteral<BDesc>;
41
- icon: import("@sinclair/typebox").TLiteral<BIcon>;
42
- hideInLibrary: import("@sinclair/typebox").TBoolean;
43
- isContainer: import("@sinclair/typebox").TBoolean;
44
- preferredWidth: TObject<{
45
- mobile: import("@sinclair/typebox").TNumber;
46
- desktop: import("@sinclair/typebox").TNumber;
47
- }>;
48
- preferredHeight: TObject<{
49
- mobile: import("@sinclair/typebox").TNumber;
50
- desktop: import("@sinclair/typebox").TNumber;
51
- }>;
52
- minWidth: TObject<{
53
- mobile: import("@sinclair/typebox").TNumber;
54
- desktop: import("@sinclair/typebox").TNumber;
55
- }>;
56
- maxWidth: TObject<{
57
- mobile: import("@sinclair/typebox").TNumber;
58
- desktop: import("@sinclair/typebox").TNumber;
59
- }>;
60
- minHeight: TObject<{
61
- mobile: import("@sinclair/typebox").TNumber;
62
- desktop: import("@sinclair/typebox").TNumber;
63
- }>;
64
- }>;
51
+ };
52
+ export declare function defineBrickManifest<BProps extends TProperties, DSSchema extends TObject | TArray<TObject>>({ props, defaultWidth, defaultHeight, minWidth, minHeight, kind, isContainer, hideInLibrary, deletable, movable, resizable, repeatable, duplicatable, defaultInspectorTab, datasource, presets, ...rest }: BrickManifestProps<BProps, DSSchema>): {
53
+ readonly datasource: DSSchema;
54
+ readonly props: TObject<BProps>;
55
+ readonly presets: Record<string, {
56
+ label: string;
57
+ previewClasses: string;
58
+ props: Partial<import("@sinclair/typebox").Evaluate<Readonly<Partial<Pick<{ [K in keyof BProps]: Static<BProps[K], unknown[] & []>; }, { [K_1 in keyof BProps]: BProps[K_1] extends import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TSchema> ? BProps[K_1] extends import("@sinclair/typebox").TOptional<BProps[K_1]> ? K_1 : never : never; }[keyof BProps]>>> & Readonly<Pick<{ [K in keyof BProps]: Static<BProps[K], unknown[] & []>; }, { [K_2 in keyof BProps]: BProps[K_2] extends import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TSchema> ? BProps[K_2] extends import("@sinclair/typebox").TOptional<BProps[K_2]> ? never : K_2 : never; }[keyof BProps]>> & Partial<Pick<{ [K in keyof BProps]: Static<BProps[K], unknown[] & []>; }, { [K_3 in keyof BProps]: BProps[K_3] extends import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TSchema> ? BProps[K_3] extends import("@sinclair/typebox").TReadonly<BProps[K_3]> ? never : K_3 : never; }[keyof BProps]>> & Required<Pick<{ [K in keyof BProps]: Static<BProps[K], unknown[] & []>; }, Exclude<keyof BProps, { [K_1 in keyof BProps]: BProps[K_1] extends import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TSchema> ? BProps[K_1] extends import("@sinclair/typebox").TOptional<BProps[K_1]> ? K_1 : never : never; }[keyof BProps] | { [K_2 in keyof BProps]: BProps[K_2] extends import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TSchema> ? BProps[K_2] extends import("@sinclair/typebox").TOptional<BProps[K_2]> ? never : K_2 : never; }[keyof BProps] | { [K_3 in keyof BProps]: BProps[K_3] extends import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TSchema> ? BProps[K_3] extends import("@sinclair/typebox").TReadonly<BProps[K_3]> ? never : K_3 : never; }[keyof BProps]>>>>>;
59
+ }> | undefined;
60
+ readonly kind: BrickKind;
61
+ readonly defaultInspectorTab: "content" | "style" | "preset";
62
+ readonly hideInLibrary: boolean;
63
+ readonly deletable: boolean;
64
+ readonly movable: boolean;
65
+ readonly resizable: boolean;
66
+ readonly repeatable: boolean;
67
+ readonly duplicatable: boolean;
68
+ readonly isContainer: boolean;
69
+ readonly defaultWidth: {
70
+ mobile: number;
71
+ desktop: number;
72
+ };
73
+ readonly defaultHeight: {
74
+ mobile: number;
75
+ desktop: number;
76
+ };
77
+ readonly minWidth: {
78
+ mobile: number;
79
+ desktop: number;
80
+ } | undefined;
81
+ readonly minHeight: {
82
+ mobile: number;
83
+ desktop: number;
84
+ } | undefined;
85
+ readonly type: string;
86
+ readonly name: string;
87
+ readonly icon: string | FC<IconBaseProps>;
88
+ readonly iconClassName?: string;
89
+ readonly description?: string;
90
+ readonly maxWidth?: {
91
+ mobile: number;
92
+ desktop: number;
93
+ };
94
+ readonly maxHeight?: {
95
+ mobile: number;
96
+ desktop: number;
97
+ };
98
+ };
65
99
  export type BrickManifest = ReturnType<typeof defineBrickManifest>;
66
- export type ResolvedBrickManifest = Static<BrickManifest>;
67
- export type BrickConstraints = Pick<ResolvedBrickManifest, "preferredWidth" | "preferredHeight" | "minWidth" | "minHeight" | "maxWidth">;
100
+ export declare function getBrickManifestDefaults<M extends BrickManifest>(manifest: M): M & {
101
+ datasource?: {
102
+ [x: string]: unknown;
103
+ [x: number]: unknown;
104
+ } | {
105
+ [x: string]: unknown;
106
+ [x: number]: unknown;
107
+ }[] | undefined;
108
+ props: {
109
+ [x: string]: unknown;
110
+ [x: number]: unknown;
111
+ };
112
+ mobileProps: {};
113
+ };
114
+ export type BrickDefaults = ReturnType<typeof getBrickManifestDefaults>;
115
+ export type BrickConstraints = Pick<BrickManifest, "defaultWidth" | "defaultHeight" | "minWidth" | "minHeight" | "maxWidth" | "resizable" | "movable">;
116
+ export {};
68
117
  //# sourceMappingURL=brick-manifest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"brick-manifest.d.ts","sourceRoot":"","sources":["../../src/shared/brick-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGtF,wBAAgB,mBAAmB,CACjC,KAAK,SAAS,MAAM,EACpB,MAAM,SAAS,MAAM,EACrB,KAAK,SAAS,MAAM,EACpB,KAAK,SAAS,MAAM,EACpB,MAAM,SAAS,WAAW,EAC1B,EACA,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,WAAW,EACX,cAAc,EACd,eAAe,EACf,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,UAAU,EACV,UAAU,EACV,WAAW,EACX,aAAa,GACd,EAAE;IACD,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,KAAK,CAAC;IACZ,WAAW,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,EAAE;QACT,MAAM,EAAE,MAAM,CAAC;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EAAE,CAAC;;;;;;;;;;;;;EAQ5E;AAED,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAExE,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,aAAa,EACb,cAAc,GAAG,eAAe,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CACnG,CAAC"}
@@ -1,3 +1,3 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a}from"./chunk-QQ7YEIHB.js";import"./chunk-PXAK7ZJ3.js";export{a as defineBrickManifest};
3
+ import{a,b}from"./chunk-WPTVLIYS.js";export{a as defineBrickManifest,b as getBrickManifestDefaults};
@@ -1,5 +1,4 @@
1
- import type { Static } from "@sinclair/typebox";
2
- import type { BrickManifest } from "../../brick-manifest";
1
+ import { type BrickDefaults, type BrickManifest } from "../../brick-manifest";
3
2
  export declare const manifests: Record<string, BrickManifest>;
4
- export declare const defaults: Record<string, Static<BrickManifest>>;
3
+ export declare const defaultProps: Record<string, BrickDefaults>;
5
4
  //# sourceMappingURL=all-manifests.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"all-manifests.d.ts","sourceRoot":"","sources":["../../../../src/shared/bricks/manifests/all-manifests.ts"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAkBnD,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC,CAkB1D,CAAC"}
1
+ {"version":3,"file":"all-manifests.d.ts","sourceRoot":"","sources":["../../../../src/shared/bricks/manifests/all-manifests.ts"],"names":[],"mappings":"AAmBA,OAAO,EAA4B,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAExG,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAmBnD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAmBtD,CAAC"}
@@ -1,3 +1,3 @@
1
- /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/enpage/enpage/blob/main/LICENSE */
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a,b}from"../../chunk-GBKDJDGW.js";import"../../chunk-G42AE2ZC.js";import"../../chunk-WXSQ2ZEK.js";import"../../chunk-YSMFNK4R.js";import"../../chunk-ZDZXB45C.js";import"../../chunk-GUOQD446.js";import"../../chunk-3PPIJUXG.js";import"../../chunk-WGWJHVOE.js";import"../../chunk-XS5WCEA6.js";import"../../chunk-ZWYM64YA.js";import"../../chunk-3T2OW4FE.js";import"../../chunk-Y3TOGUNY.js";import"../../chunk-ZYVXEGAM.js";import"../../chunk-RRTB52G4.js";import"../../chunk-NYPOZ5T2.js";import"../../chunk-YXGFGLKH.js";import"../../chunk-5PE57DBS.js";import"../../chunk-UIKVMZNI.js";import"../../chunk-QQ7YEIHB.js";import"../../chunk-PXAK7ZJ3.js";import"../../chunk-PZCWP77P.js";import"../../chunk-MEMG6QPT.js";export{b as defaults,a as manifests};
3
+ import{a,b}from"../../chunk-CSBX76ZN.js";import"../../chunk-TQ23UATQ.js";import"../../chunk-XYID4ZEA.js";import"../../chunk-DAPQ4JPP.js";import"../../chunk-WOEBR25A.js";import"../../chunk-BK6LBWDI.js";import"../../chunk-6I4PY5WS.js";import"../../chunk-3CY6AZG7.js";import"../../chunk-HW5TY2QW.js";import"../../chunk-AZ63RF3K.js";import"../../chunk-PJ6HA55L.js";import"../../chunk-U4R5EGBK.js";import"../../chunk-HIZPJNEM.js";import"../../chunk-KB4HY432.js";import"../../chunk-Q4MXTCE4.js";import"../../chunk-QRBMK5UX.js";import"../../chunk-JVDUEZYO.js";import"../../chunk-FGU4BGP4.js";import"../../chunk-XGCBIXOO.js";import"../../chunk-SQVL4WSX.js";import"../../chunk-XBX6II3M.js";import"../../chunk-XEQ2XZLQ.js";import"../../chunk-RBYYMUOZ.js";import"../../chunk-SO5M7CYA.js";import"../../chunk-IWSVY2VC.js";import"../../chunk-F2ZVIFHO.js";import"../../chunk-NFU5BF6G.js";import"../../chunk-EFJQECVB.js";import"../../chunk-U44NTSIO.js";import"../../chunk-P5FVZ5PL.js";import"../../chunk-LDOM2LJF.js";import"../../chunk-PD7P5KSV.js";import"../../chunk-WPTVLIYS.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";export{b as defaultProps,a as manifests};