@upstart.gg/sdk 0.0.96 → 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/publish/cmd-publish.d.ts.map +1 -1
  6. package/dist/node/cli/commands/publish/cmd-publish.js +18 -18
  7. package/dist/node/cli/commands/publish/cmd-publish.js.map +1 -1
  8. package/dist/node/cli/commands/publish/uploader.js +7 -7
  9. package/dist/node/cli/commands/publish/uploader.js.map +1 -1
  10. package/dist/node/cli/is-logged-in.js +2 -2
  11. package/dist/node/cli/is-logged-in.js.map +1 -1
  12. package/dist/node/cli/program.js +24 -24
  13. package/dist/node/cli/program.js.map +1 -1
  14. package/dist/node/shared/config.d.ts +4 -14
  15. package/dist/node/shared/config.d.ts.map +1 -1
  16. package/dist/node/shared/config.js +4 -4
  17. package/dist/node/shared/config.js.map +1 -1
  18. package/dist/node/shared/logger.d.ts.map +1 -1
  19. package/dist/node/shared/logger.js +2 -2
  20. package/dist/node/shared/logger.js.map +1 -1
  21. package/dist/shared/ajv.d.ts +2 -0
  22. package/dist/shared/ajv.d.ts.map +1 -1
  23. package/dist/shared/ajv.js +1 -1
  24. package/dist/shared/attributes.d.ts +20 -93
  25. package/dist/shared/attributes.d.ts.map +1 -1
  26. package/dist/shared/attributes.js +1 -1
  27. package/dist/shared/brick-manifest.d.ts +7 -17
  28. package/dist/shared/brick-manifest.d.ts.map +1 -1
  29. package/dist/shared/brick-manifest.js +1 -1
  30. package/dist/shared/bricks/manifests/accordion.manifest.d.ts +111 -0
  31. package/dist/shared/bricks/manifests/accordion.manifest.d.ts.map +1 -0
  32. package/dist/shared/bricks/manifests/accordion.manifest.js +3 -0
  33. package/dist/shared/bricks/manifests/all-manifests.d.ts +5 -0
  34. package/dist/shared/bricks/manifests/all-manifests.d.ts.map +1 -1
  35. package/dist/shared/bricks/manifests/all-manifests.js +1 -1
  36. package/dist/shared/bricks/manifests/button.manifest.d.ts +22 -13
  37. package/dist/shared/bricks/manifests/button.manifest.d.ts.map +1 -1
  38. package/dist/shared/bricks/manifests/button.manifest.js +1 -1
  39. package/dist/shared/bricks/manifests/card.manifest.d.ts +44 -54
  40. package/dist/shared/bricks/manifests/card.manifest.d.ts.map +1 -1
  41. package/dist/shared/bricks/manifests/card.manifest.js +1 -1
  42. package/dist/shared/bricks/manifests/carousel.manifest.d.ts +39 -12
  43. package/dist/shared/bricks/manifests/carousel.manifest.d.ts.map +1 -1
  44. package/dist/shared/bricks/manifests/carousel.manifest.js +1 -1
  45. package/dist/shared/bricks/manifests/container.manifest.d.ts +49 -172
  46. package/dist/shared/bricks/manifests/container.manifest.d.ts.map +1 -1
  47. package/dist/shared/bricks/manifests/container.manifest.js +1 -1
  48. package/dist/shared/bricks/manifests/divider.manifest.d.ts +63 -0
  49. package/dist/shared/bricks/manifests/divider.manifest.d.ts.map +1 -0
  50. package/dist/shared/bricks/manifests/divider.manifest.js +3 -0
  51. package/dist/shared/bricks/manifests/footer.manifest.d.ts +30 -35
  52. package/dist/shared/bricks/manifests/footer.manifest.d.ts.map +1 -1
  53. package/dist/shared/bricks/manifests/footer.manifest.js +1 -1
  54. package/dist/shared/bricks/manifests/form.manifest.d.ts +22 -12
  55. package/dist/shared/bricks/manifests/form.manifest.d.ts.map +1 -1
  56. package/dist/shared/bricks/manifests/form.manifest.js +1 -1
  57. package/dist/shared/bricks/manifests/hero.manifest.d.ts +31 -71
  58. package/dist/shared/bricks/manifests/hero.manifest.d.ts.map +1 -1
  59. package/dist/shared/bricks/manifests/hero.manifest.js +1 -1
  60. package/dist/shared/bricks/manifests/icon.manifest.d.ts +18 -12
  61. package/dist/shared/bricks/manifests/icon.manifest.d.ts.map +1 -1
  62. package/dist/shared/bricks/manifests/icon.manifest.js +1 -1
  63. package/dist/shared/bricks/manifests/image.manifest.d.ts +36 -50
  64. package/dist/shared/bricks/manifests/image.manifest.d.ts.map +1 -1
  65. package/dist/shared/bricks/manifests/image.manifest.js +1 -1
  66. package/dist/shared/bricks/manifests/images-gallery.manifest.d.ts +55 -115
  67. package/dist/shared/bricks/manifests/images-gallery.manifest.d.ts.map +1 -1
  68. package/dist/shared/bricks/manifests/images-gallery.manifest.js +1 -1
  69. package/dist/shared/bricks/manifests/map.manifest.d.ts +36 -12
  70. package/dist/shared/bricks/manifests/map.manifest.d.ts.map +1 -1
  71. package/dist/shared/bricks/manifests/map.manifest.js +1 -1
  72. package/dist/shared/bricks/manifests/navbar.manifest.d.ts +160 -0
  73. package/dist/shared/bricks/manifests/navbar.manifest.d.ts.map +1 -0
  74. package/dist/shared/bricks/manifests/navbar.manifest.js +3 -0
  75. package/dist/shared/bricks/manifests/sidebar.manifest.d.ts +83 -12
  76. package/dist/shared/bricks/manifests/sidebar.manifest.d.ts.map +1 -1
  77. package/dist/shared/bricks/manifests/sidebar.manifest.js +1 -1
  78. package/dist/shared/bricks/manifests/social-links.manifest.d.ts +37 -12
  79. package/dist/shared/bricks/manifests/social-links.manifest.d.ts.map +1 -1
  80. package/dist/shared/bricks/manifests/social-links.manifest.js +1 -1
  81. package/dist/shared/bricks/manifests/testimonials.manifest.d.ts +94 -0
  82. package/dist/shared/bricks/manifests/testimonials.manifest.d.ts.map +1 -0
  83. package/dist/shared/bricks/manifests/testimonials.manifest.js +3 -0
  84. package/dist/shared/bricks/manifests/text.manifest.d.ts +31 -63
  85. package/dist/shared/bricks/manifests/text.manifest.d.ts.map +1 -1
  86. package/dist/shared/bricks/manifests/text.manifest.js +1 -1
  87. package/dist/shared/bricks/manifests/timeline.manifest.d.ts +122 -0
  88. package/dist/shared/bricks/manifests/timeline.manifest.d.ts.map +1 -0
  89. package/dist/shared/bricks/manifests/timeline.manifest.js +3 -0
  90. package/dist/shared/bricks/manifests/video.manifest.d.ts +38 -12
  91. package/dist/shared/bricks/manifests/video.manifest.d.ts.map +1 -1
  92. package/dist/shared/bricks/manifests/video.manifest.js +1 -1
  93. package/dist/shared/bricks/props/_style-presets.d.ts +1 -1
  94. package/dist/shared/bricks/props/_style-presets.d.ts.map +1 -1
  95. package/dist/shared/bricks/props/_style-presets.js +1 -1
  96. package/dist/shared/bricks/props/align.d.ts +7 -3
  97. package/dist/shared/bricks/props/align.d.ts.map +1 -1
  98. package/dist/shared/bricks/props/align.js +1 -1
  99. package/dist/shared/bricks/props/background.d.ts +8 -1
  100. package/dist/shared/bricks/props/background.d.ts.map +1 -1
  101. package/dist/shared/bricks/props/background.js +1 -1
  102. package/dist/shared/bricks/props/boolean.js +1 -1
  103. package/dist/shared/bricks/props/border.d.ts +24 -22
  104. package/dist/shared/bricks/props/border.d.ts.map +1 -1
  105. package/dist/shared/bricks/props/border.js +1 -1
  106. package/dist/shared/bricks/props/color.d.ts +5 -0
  107. package/dist/shared/bricks/props/color.d.ts.map +1 -0
  108. package/dist/shared/bricks/props/color.js +3 -0
  109. package/dist/shared/bricks/props/common.d.ts +9 -1
  110. package/dist/shared/bricks/props/common.d.ts.map +1 -1
  111. package/dist/shared/bricks/props/common.js +1 -1
  112. package/dist/shared/bricks/props/container.d.ts +37 -45
  113. package/dist/shared/bricks/props/container.d.ts.map +1 -1
  114. package/dist/shared/bricks/props/container.js +1 -1
  115. package/dist/shared/bricks/props/css-length.d.ts +5 -0
  116. package/dist/shared/bricks/props/css-length.d.ts.map +1 -0
  117. package/dist/shared/bricks/props/css-length.js +3 -0
  118. package/dist/shared/bricks/props/datasource.d.ts +9 -13
  119. package/dist/shared/bricks/props/datasource.d.ts.map +1 -1
  120. package/dist/shared/bricks/props/datasource.js +1 -1
  121. package/dist/shared/bricks/props/date.d.ts +4 -0
  122. package/dist/shared/bricks/props/date.d.ts.map +1 -0
  123. package/dist/shared/bricks/props/date.js +3 -0
  124. package/dist/shared/bricks/props/effects.d.ts +4 -21
  125. package/dist/shared/bricks/props/effects.d.ts.map +1 -1
  126. package/dist/shared/bricks/props/effects.js +1 -1
  127. package/dist/shared/bricks/props/enum.d.ts +13 -0
  128. package/dist/shared/bricks/props/enum.d.ts.map +1 -0
  129. package/dist/shared/bricks/props/enum.js +3 -0
  130. package/dist/shared/bricks/props/file.d.ts +2 -0
  131. package/dist/shared/bricks/props/file.d.ts.map +1 -0
  132. package/dist/shared/bricks/props/file.js +3 -0
  133. package/dist/shared/bricks/props/geolocation.d.ts +16 -0
  134. package/dist/shared/bricks/props/geolocation.d.ts.map +1 -0
  135. package/dist/shared/bricks/props/geolocation.js +3 -0
  136. package/dist/shared/bricks/props/helpers.d.ts +8 -4
  137. package/dist/shared/bricks/props/helpers.d.ts.map +1 -1
  138. package/dist/shared/bricks/props/helpers.js +1 -1
  139. package/dist/shared/bricks/props/image.d.ts +7 -1
  140. package/dist/shared/bricks/props/image.d.ts.map +1 -1
  141. package/dist/shared/bricks/props/image.js +1 -1
  142. package/dist/shared/bricks/props/number.js +1 -1
  143. package/dist/shared/bricks/props/padding.d.ts +2 -1
  144. package/dist/shared/bricks/props/padding.d.ts.map +1 -1
  145. package/dist/shared/bricks/props/padding.js +1 -1
  146. package/dist/shared/bricks/props/position.d.ts.map +1 -1
  147. package/dist/shared/bricks/props/position.js +1 -1
  148. package/dist/shared/bricks/props/preset.d.ts +92 -0
  149. package/dist/shared/bricks/props/preset.d.ts.map +1 -0
  150. package/dist/shared/bricks/props/preset.js +3 -0
  151. package/dist/shared/bricks/props/string.d.ts +8 -3
  152. package/dist/shared/bricks/props/string.d.ts.map +1 -1
  153. package/dist/shared/bricks/props/string.js +1 -1
  154. package/dist/shared/bricks/props/text.d.ts +3 -4
  155. package/dist/shared/bricks/props/text.d.ts.map +1 -1
  156. package/dist/shared/bricks/props/text.js +1 -1
  157. package/dist/shared/bricks/props/types.d.ts +5 -2
  158. package/dist/shared/bricks/props/types.d.ts.map +1 -1
  159. package/dist/shared/bricks.d.ts +243 -134
  160. package/dist/shared/bricks.d.ts.map +1 -1
  161. package/dist/shared/bricks.js +1 -1
  162. package/dist/shared/chunk-2AJYHJFG.js +8 -0
  163. package/dist/shared/chunk-2FHWS73Y.js +6 -0
  164. package/dist/shared/chunk-3FJVF357.js +3 -0
  165. package/dist/shared/chunk-3RHYJ6E7.js +5 -0
  166. package/dist/shared/chunk-3VZACK2Y.js +3 -0
  167. package/dist/shared/chunk-3XCKZ4JQ.js +3 -0
  168. package/dist/shared/chunk-4MPRHJWO.js +3 -0
  169. package/dist/shared/chunk-5EOWW7BX.js +4 -0
  170. package/dist/shared/chunk-5HYPCOSS.js +3 -0
  171. package/dist/shared/chunk-5K5C6XFX.js +3 -0
  172. package/dist/shared/chunk-6QS5PKLA.js +3 -0
  173. package/dist/shared/chunk-74EL657O.js +3 -0
  174. package/dist/shared/chunk-AJDYOLKP.js +3 -0
  175. package/dist/shared/chunk-ALFOZHAH.js +3 -0
  176. package/dist/shared/{chunk-FGU4BGP4.js → chunk-ATDJCXC2.js} +1 -1
  177. package/dist/shared/chunk-BJSO43AS.js +3 -0
  178. package/dist/shared/chunk-BTKLQQZA.js +3 -0
  179. package/dist/shared/chunk-CAVNF3BU.js +3 -0
  180. package/dist/shared/chunk-CCNU3J56.js +3 -0
  181. package/dist/shared/chunk-CTRS76PX.js +3 -0
  182. package/dist/shared/chunk-DCH2FI6T.js +8 -0
  183. package/dist/shared/chunk-DFSQR6QC.js +3 -0
  184. package/dist/shared/chunk-ENU4SEHO.js +3 -0
  185. package/dist/shared/chunk-G7LX3UKQ.js +3 -0
  186. package/dist/shared/chunk-GGJBTPGW.js +3 -0
  187. package/dist/shared/chunk-H24R3IWA.js +3 -0
  188. package/dist/shared/chunk-HYVQXAK5.js +3 -0
  189. package/dist/shared/chunk-LKVQQQTI.js +3 -0
  190. package/dist/shared/chunk-MITJPRGD.js +6 -0
  191. package/dist/shared/chunk-NLZBY65T.js +3 -0
  192. package/dist/shared/chunk-OUI2VDNM.js +3 -0
  193. package/dist/shared/chunk-OYIL5SCU.js +3 -0
  194. package/dist/shared/chunk-P5DZK4TS.js +3 -0
  195. package/dist/shared/chunk-PK3R5VOF.js +3 -0
  196. package/dist/shared/chunk-QPATZM3I.js +3 -0
  197. package/dist/shared/chunk-RDBEWW4G.js +7 -0
  198. package/dist/shared/chunk-RPBQZW5I.js +3 -0
  199. package/dist/shared/chunk-SLSIAUYV.js +3 -0
  200. package/dist/shared/chunk-SUG225LF.js +3 -0
  201. package/dist/shared/chunk-U5XOIYSS.js +3 -0
  202. package/dist/shared/{chunk-HIZPJNEM.js → chunk-UL7L3HYV.js} +1 -1
  203. package/dist/shared/chunk-V6BCYHZH.js +3 -0
  204. package/dist/shared/chunk-VA5LFJVE.js +3 -0
  205. package/dist/shared/chunk-VAC73HJE.js +3 -0
  206. package/dist/shared/chunk-VBWC36L2.js +3 -0
  207. package/dist/shared/chunk-VLGLD6GR.js +3 -0
  208. package/dist/shared/chunk-VTFWVTPI.js +3 -0
  209. package/dist/shared/chunk-WAAKB6OB.js +3 -0
  210. package/dist/shared/chunk-Y36SM2AO.js +3 -0
  211. package/dist/shared/chunk-Y7CEEEVW.js +3 -0
  212. package/dist/shared/chunk-YZ5Y4WE6.js +3 -0
  213. package/dist/shared/chunk-Z7SYP6FG.js +3 -0
  214. package/dist/shared/chunk-ZJNA4QQC.js +3 -0
  215. package/dist/shared/chunk-ZMDHKAWL.js +3 -0
  216. package/dist/shared/context.d.ts +38 -0
  217. package/dist/shared/context.d.ts.map +1 -0
  218. package/dist/shared/{chunk-WJ5CDDXW.js → context.js} +0 -1
  219. package/dist/shared/datarecords/types.d.ts +40 -20
  220. package/dist/shared/datarecords/types.d.ts.map +1 -1
  221. package/dist/shared/datarecords/types.js +1 -1
  222. package/dist/shared/datasources/external/http-json/fetcher.d.ts.map +1 -0
  223. package/dist/shared/datasources/external/http-json/options.d.ts.map +1 -0
  224. package/dist/shared/datasources/external/{json → http-json}/schema.d.ts +0 -1
  225. package/dist/shared/datasources/external/http-json/schema.d.ts.map +1 -0
  226. package/dist/shared/datasources/external/http-json/tests/fetcher.test.d.ts.map +1 -0
  227. package/dist/shared/datasources/external/rss/fetcher.d.ts.map +1 -1
  228. package/dist/shared/datasources/external/rss/sample.d.ts.map +1 -1
  229. package/dist/shared/datasources/external/rss/schema.d.ts +7 -13
  230. package/dist/shared/datasources/external/rss/schema.d.ts.map +1 -1
  231. package/dist/shared/datasources/external/youtube/list/sample.d.ts +23 -32
  232. package/dist/shared/datasources/external/youtube/list/sample.d.ts.map +1 -1
  233. package/dist/shared/datasources/external/youtube/list/schema.d.ts +24 -33
  234. package/dist/shared/datasources/external/youtube/list/schema.d.ts.map +1 -1
  235. package/dist/shared/datasources/internal/blog/schema.d.ts.map +1 -1
  236. package/dist/shared/datasources/internal/changelog/schema.d.ts.map +1 -1
  237. package/dist/shared/datasources/internal/recipes/schema.d.ts.map +1 -1
  238. package/dist/shared/datasources/samples.d.ts +1 -1
  239. package/dist/shared/datasources/samples.d.ts.map +1 -1
  240. package/dist/shared/datasources/schemas.d.ts +33 -583
  241. package/dist/shared/datasources/schemas.d.ts.map +1 -1
  242. package/dist/shared/datasources/schemas.js +1 -1
  243. package/dist/shared/datasources/types.d.ts +75 -1314
  244. package/dist/shared/datasources/types.d.ts.map +1 -1
  245. package/dist/shared/datasources/types.js +1 -1
  246. package/dist/shared/datasources.d.ts +14 -0
  247. package/dist/shared/datasources.d.ts.map +1 -1
  248. package/dist/shared/datasources.js +1 -1
  249. package/dist/shared/images.d.ts +30 -0
  250. package/dist/shared/images.d.ts.map +1 -0
  251. package/dist/shared/images.js +3 -0
  252. package/dist/shared/layout-constants.js +1 -1
  253. package/dist/shared/page.d.ts +104 -2670
  254. package/dist/shared/page.d.ts.map +1 -1
  255. package/dist/shared/page.js +1 -1
  256. package/dist/shared/prompt.d.ts +4 -0
  257. package/dist/shared/prompt.d.ts.map +1 -0
  258. package/dist/shared/prompt.js +3 -0
  259. package/dist/shared/responsive.d.ts +3 -3
  260. package/dist/shared/responsive.d.ts.map +1 -1
  261. package/dist/shared/responsive.js +1 -1
  262. package/dist/shared/site.d.ts +545 -0
  263. package/dist/shared/site.d.ts.map +1 -0
  264. package/dist/shared/site.js +3 -0
  265. package/dist/shared/sitemap.d.ts +38 -0
  266. package/dist/shared/sitemap.d.ts.map +1 -0
  267. package/dist/shared/sitemap.js +3 -0
  268. package/dist/shared/theme.d.ts +41 -19
  269. package/dist/shared/theme.d.ts.map +1 -1
  270. package/dist/shared/theme.js +1 -1
  271. package/dist/shared/themes/color-system.d.ts +5 -309
  272. package/dist/shared/themes/color-system.d.ts.map +1 -1
  273. package/dist/shared/themes/color-system.js +1 -1
  274. package/dist/shared/utils/invariant.js +1 -1
  275. package/dist/shared/utils/schema.d.ts +10 -2
  276. package/dist/shared/utils/schema.d.ts.map +1 -1
  277. package/dist/shared/utils/schema.js +1 -1
  278. package/dist/shared/utils/typed-ref.d.ts +32 -0
  279. package/dist/shared/utils/typed-ref.d.ts.map +1 -0
  280. package/dist/shared/utils/typed-ref.js +3 -0
  281. package/package.json +11 -11
  282. package/src/node/cli/api.ts +101 -0
  283. package/src/node/cli/commands/cmd-build.ts +64 -0
  284. package/src/node/cli/commands/login/cmd-login.ts +111 -0
  285. package/src/node/cli/commands/logout/cmd-logout.ts +11 -0
  286. package/src/node/cli/commands/publish/cmd-publish.ts +135 -0
  287. package/src/node/cli/commands/publish/parse-gitignore.ts +278 -0
  288. package/src/node/cli/commands/publish/uploader.ts +333 -0
  289. package/src/node/cli/constants.ts +14 -0
  290. package/src/node/cli/is-logged-in.ts +28 -0
  291. package/src/node/cli/program.ts +77 -0
  292. package/src/node/cli/store.ts +64 -0
  293. package/src/node/cli/tests/api.test.ts +161 -0
  294. package/src/node/cli/types.ts +34 -0
  295. package/src/node/cli/utils.ts +20 -0
  296. package/src/node/shared/config.ts +69 -0
  297. package/src/node/shared/logger.ts +44 -0
  298. package/src/shared/ajv.ts +111 -0
  299. package/src/shared/analytics/init.ts +14 -0
  300. package/src/shared/analytics/track.ts +21 -0
  301. package/src/shared/analytics/types.ts +13 -0
  302. package/src/shared/attributes.ts +222 -0
  303. package/src/shared/brick-manifest.ts +110 -0
  304. package/src/shared/bricks/manifests/accordion.manifest.ts +179 -0
  305. package/src/shared/bricks/manifests/all-manifests.ts +92 -0
  306. package/src/shared/bricks/manifests/button.manifest.ts +145 -0
  307. package/src/shared/bricks/manifests/card.manifest.ts +269 -0
  308. package/src/shared/bricks/manifests/carousel.manifest.ts +106 -0
  309. package/src/shared/bricks/manifests/container.manifest.ts +357 -0
  310. package/src/shared/bricks/manifests/divider.manifest.ts +121 -0
  311. package/src/shared/bricks/manifests/footer.manifest.ts +487 -0
  312. package/src/shared/bricks/manifests/form.manifest.ts +112 -0
  313. package/src/shared/bricks/manifests/hero.manifest.ts +132 -0
  314. package/src/shared/bricks/manifests/icon.manifest.ts +130 -0
  315. package/src/shared/bricks/manifests/image.manifest.ts +203 -0
  316. package/src/shared/bricks/manifests/images-gallery.manifest.ts +227 -0
  317. package/src/shared/bricks/manifests/map.manifest.ts +75 -0
  318. package/src/shared/bricks/manifests/navbar.manifest.ts +344 -0
  319. package/src/shared/bricks/manifests/sidebar.manifest.ts +90 -0
  320. package/src/shared/bricks/manifests/social-links.manifest.ts +370 -0
  321. package/src/shared/bricks/manifests/testimonials.manifest.ts +397 -0
  322. package/src/shared/bricks/manifests/tests/header.manifest.test.ts +10 -0
  323. package/src/shared/bricks/manifests/text.manifest.ts +164 -0
  324. package/src/shared/bricks/manifests/timeline.manifest.ts +456 -0
  325. package/src/shared/bricks/manifests/video.manifest.ts +59 -0
  326. package/src/shared/bricks/props/_style-presets.ts +352 -0
  327. package/src/shared/bricks/props/align.ts +59 -0
  328. package/src/shared/bricks/props/background.ts +118 -0
  329. package/src/shared/bricks/props/boolean.ts +11 -0
  330. package/src/shared/bricks/props/border.ts +84 -0
  331. package/src/shared/bricks/props/color.ts +24 -0
  332. package/src/shared/bricks/props/common.ts +37 -0
  333. package/src/shared/bricks/props/container.ts +356 -0
  334. package/src/shared/bricks/props/css-length.ts +25 -0
  335. package/src/shared/bricks/props/datasource.ts +60 -0
  336. package/src/shared/bricks/props/date.ts +24 -0
  337. package/src/shared/bricks/props/effects.ts +123 -0
  338. package/src/shared/bricks/props/enum.ts +42 -0
  339. package/src/shared/bricks/props/file.ts +12 -0
  340. package/src/shared/bricks/props/geolocation.ts +30 -0
  341. package/src/shared/bricks/props/helpers.ts +101 -0
  342. package/src/shared/bricks/props/image.ts +90 -0
  343. package/src/shared/bricks/props/number.ts +16 -0
  344. package/src/shared/bricks/props/padding.ts +21 -0
  345. package/src/shared/bricks/props/position.ts +27 -0
  346. package/src/shared/bricks/props/preset.ts +136 -0
  347. package/src/shared/bricks/props/string.ts +60 -0
  348. package/src/shared/bricks/props/tests/align.test.ts +37 -0
  349. package/src/shared/bricks/props/tests/background.test.ts +102 -0
  350. package/src/shared/bricks/props/tests/border.test.ts +38 -0
  351. package/src/shared/bricks/props/tests/effects.test.ts +37 -0
  352. package/src/shared/bricks/props/tests/helpers.test.ts +133 -0
  353. package/src/shared/bricks/props/tests/image.test.ts +71 -0
  354. package/src/shared/bricks/props/tests/padding.ts +12 -0
  355. package/src/shared/bricks/props/tests/string.test.ts +79 -0
  356. package/src/shared/bricks/props/text.ts +66 -0
  357. package/src/shared/bricks/props/types.ts +57 -0
  358. package/src/shared/bricks.ts +232 -0
  359. package/src/shared/context.ts +39 -0
  360. package/src/shared/datarecords/external/airtable/handler.ts +21 -0
  361. package/src/shared/datarecords/external/airtable/options.ts +22 -0
  362. package/src/shared/datarecords/external/generic-webhook/handler.ts +10 -0
  363. package/src/shared/datarecords/external/generic-webhook/options.ts +13 -0
  364. package/src/shared/datarecords/external/google/oauth/config.ts +30 -0
  365. package/src/shared/datarecords/external/google/sheets/handler.ts +26 -0
  366. package/src/shared/datarecords/external/google/sheets/options.ts +9 -0
  367. package/src/shared/datarecords/types.ts +120 -0
  368. package/src/shared/datarecords.ts +5 -0
  369. package/src/shared/datasources/README.md +3 -0
  370. package/src/shared/datasources/external/facebook/posts/fetcher.ts +62 -0
  371. package/src/shared/datasources/external/facebook/posts/sample.ts +35 -0
  372. package/src/shared/datasources/external/facebook/posts/schema.ts +33 -0
  373. package/src/shared/datasources/external/facebook/posts/tests/fetcher.test.ts +91 -0
  374. package/src/shared/datasources/external/http-json/fetcher.ts +28 -0
  375. package/src/shared/datasources/external/http-json/options.ts +12 -0
  376. package/src/shared/datasources/external/http-json/schema.ts +6 -0
  377. package/src/shared/datasources/external/http-json/tests/fetcher.test.ts +70 -0
  378. package/src/shared/datasources/external/instagram/feed/fetcher.ts +43 -0
  379. package/src/shared/datasources/external/instagram/feed/sample.ts +22 -0
  380. package/src/shared/datasources/external/instagram/feed/schema.ts +23 -0
  381. package/src/shared/datasources/external/instagram/feed/tests/fetcher.test.ts +82 -0
  382. package/src/shared/datasources/external/mastodon/account/fetcher.ts +33 -0
  383. package/src/shared/datasources/external/mastodon/account/sample.ts +33 -0
  384. package/src/shared/datasources/external/mastodon/account/schema.ts +45 -0
  385. package/src/shared/datasources/external/mastodon/account/tests/fetcher.test.ts +65 -0
  386. package/src/shared/datasources/external/mastodon/options.ts +11 -0
  387. package/src/shared/datasources/external/mastodon/status/fetcher.ts +45 -0
  388. package/src/shared/datasources/external/mastodon/status/sample.array.ts +59 -0
  389. package/src/shared/datasources/external/mastodon/status/sample.single.ts +55 -0
  390. package/src/shared/datasources/external/mastodon/status/schema.ts +130 -0
  391. package/src/shared/datasources/external/mastodon/status/tests/fetcher.test.ts +74 -0
  392. package/src/shared/datasources/external/meta/oauth/config.ts +16 -0
  393. package/src/shared/datasources/external/meta/options.ts +11 -0
  394. package/src/shared/datasources/external/rss/fetcher.ts +30 -0
  395. package/src/shared/datasources/external/rss/options.ts +11 -0
  396. package/src/shared/datasources/external/rss/sample.ts +22 -0
  397. package/src/shared/datasources/external/rss/schema.ts +42 -0
  398. package/src/shared/datasources/external/threads/media/fetcher.ts +63 -0
  399. package/src/shared/datasources/external/threads/media/sample.ts +44 -0
  400. package/src/shared/datasources/external/threads/media/schema.ts +37 -0
  401. package/src/shared/datasources/external/tiktok/oauth/config.ts +17 -0
  402. package/src/shared/datasources/external/tiktok/video/fetcher.ts +49 -0
  403. package/src/shared/datasources/external/tiktok/video/options.ts +12 -0
  404. package/src/shared/datasources/external/tiktok/video/sample.ts +26 -0
  405. package/src/shared/datasources/external/tiktok/video/schema.ts +27 -0
  406. package/src/shared/datasources/external/youtube/list/fetcher.ts +46 -0
  407. package/src/shared/datasources/external/youtube/list/options.ts +15 -0
  408. package/src/shared/datasources/external/youtube/list/sample.ts +33 -0
  409. package/src/shared/datasources/external/youtube/list/schema.ts +38 -0
  410. package/src/shared/datasources/external/youtube/oauth/config.ts +15 -0
  411. package/src/shared/datasources/fetcher.ts +17 -0
  412. package/src/shared/datasources/internal/blog/schema.ts +69 -0
  413. package/src/shared/datasources/internal/changelog/schema.ts +48 -0
  414. package/src/shared/datasources/internal/contact-info/schema.ts +20 -0
  415. package/src/shared/datasources/internal/cv/schema.ts +217 -0
  416. package/src/shared/datasources/internal/faq/schema.ts +27 -0
  417. package/src/shared/datasources/internal/job-board/schema.ts +228 -0
  418. package/src/shared/datasources/internal/links/schema.ts +15 -0
  419. package/src/shared/datasources/internal/recipes/schema.ts +42 -0
  420. package/src/shared/datasources/internal/restaurant/schema.ts +225 -0
  421. package/src/shared/datasources/provider-options.ts +7 -0
  422. package/src/shared/datasources/samples.ts +26 -0
  423. package/src/shared/datasources/schemas.ts +45 -0
  424. package/src/shared/datasources/types.ts +276 -0
  425. package/src/shared/datasources/utils.ts +16 -0
  426. package/src/shared/datasources.ts +42 -0
  427. package/src/shared/env.ts +23 -0
  428. package/src/shared/errors.ts +1 -0
  429. package/src/shared/images.ts +44 -0
  430. package/src/shared/index.ts +3 -0
  431. package/src/shared/layout-constants.ts +25 -0
  432. package/src/shared/manifest.ts +50 -0
  433. package/src/shared/oauth.ts +16 -0
  434. package/src/shared/page.ts +61 -0
  435. package/src/shared/prompt.ts +9 -0
  436. package/src/shared/responsive.ts +5 -0
  437. package/src/shared/site.ts +97 -0
  438. package/src/shared/sitemap.ts +66 -0
  439. package/src/shared/social-icons.ts +307 -0
  440. package/src/shared/tests/attributes.test.ts +37 -0
  441. package/src/shared/theme.ts +245 -0
  442. package/src/shared/themes/README.md +34 -0
  443. package/src/shared/themes/color-system.ts +127 -0
  444. package/src/shared/utils/canvas-data-uri.ts +2 -0
  445. package/src/shared/utils/invariant.ts +25 -0
  446. package/src/shared/utils/json-date.ts +8 -0
  447. package/src/shared/utils/merge.ts +12 -0
  448. package/src/shared/utils/object-hash.ts +7 -0
  449. package/src/shared/utils/schema.ts +30 -0
  450. package/src/shared/utils/try-catch.ts +12 -0
  451. package/src/shared/utils/typed-ref.ts +41 -0
  452. package/dist/shared/bricks/manifests/countdown.manifest.d.ts +0 -57
  453. package/dist/shared/bricks/manifests/countdown.manifest.d.ts.map +0 -1
  454. package/dist/shared/bricks/manifests/countdown.manifest.js +0 -3
  455. package/dist/shared/bricks/manifests/generic-component.manifest.d.ts +0 -62
  456. package/dist/shared/bricks/manifests/generic-component.manifest.d.ts.map +0 -1
  457. package/dist/shared/bricks/manifests/generic-component.manifest.js +0 -3
  458. package/dist/shared/bricks/manifests/header.manifest.d.ts +0 -275
  459. package/dist/shared/bricks/manifests/header.manifest.d.ts.map +0 -1
  460. package/dist/shared/bricks/manifests/header.manifest.js +0 -3
  461. package/dist/shared/bricks/props/_docs-common-styles.d.ts +0 -59
  462. package/dist/shared/bricks/props/_docs-common-styles.d.ts.map +0 -1
  463. package/dist/shared/bricks/props/_docs-common-styles.js +0 -3
  464. package/dist/shared/bricks/props/tests/container.test.d.ts +0 -2
  465. package/dist/shared/bricks/props/tests/container.test.d.ts.map +0 -1
  466. package/dist/shared/chunk-2ZPY4LCA.js +0 -3
  467. package/dist/shared/chunk-3CY6AZG7.js +0 -3
  468. package/dist/shared/chunk-4K5NN4CN.js +0 -3
  469. package/dist/shared/chunk-4NCCSLBW.js +0 -3
  470. package/dist/shared/chunk-6I4PY5WS.js +0 -3
  471. package/dist/shared/chunk-6LDLGZUM.js +0 -3
  472. package/dist/shared/chunk-AZ63RF3K.js +0 -3
  473. package/dist/shared/chunk-BH4HTAAC.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-DAPQ4JPP.js +0 -3
  477. package/dist/shared/chunk-ECZ6FGZM.js +0 -3
  478. package/dist/shared/chunk-EFJQECVB.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-IWSVY2VC.js +0 -3
  482. package/dist/shared/chunk-JVDUEZYO.js +0 -3
  483. package/dist/shared/chunk-KB4HY432.js +0 -3
  484. package/dist/shared/chunk-KOTGMAXH.js +0 -3
  485. package/dist/shared/chunk-LDOM2LJF.js +0 -3
  486. package/dist/shared/chunk-NFU5BF6G.js +0 -3
  487. package/dist/shared/chunk-P5FVZ5PL.js +0 -3
  488. package/dist/shared/chunk-PD7P5KSV.js +0 -3
  489. package/dist/shared/chunk-PJ6HA55L.js +0 -3
  490. package/dist/shared/chunk-PSNFBHPU.js +0 -3
  491. package/dist/shared/chunk-PSSJMWGU.js +0 -3
  492. package/dist/shared/chunk-PU2FOOTY.js +0 -3
  493. package/dist/shared/chunk-Q4MXTCE4.js +0 -8
  494. package/dist/shared/chunk-RBYYMUOZ.js +0 -3
  495. package/dist/shared/chunk-S2RQWOG2.js +0 -3
  496. package/dist/shared/chunk-SO5M7CYA.js +0 -3
  497. package/dist/shared/chunk-THRRILTW.js +0 -3
  498. package/dist/shared/chunk-TQ23UATQ.js +0 -3
  499. package/dist/shared/chunk-U44NTSIO.js +0 -3
  500. package/dist/shared/chunk-U4R5EGBK.js +0 -3
  501. package/dist/shared/chunk-WOEBR25A.js +0 -3
  502. package/dist/shared/chunk-WPTVLIYS.js +0 -3
  503. package/dist/shared/chunk-WXKRIUTA.js +0 -3
  504. package/dist/shared/chunk-XBX6II3M.js +0 -3
  505. package/dist/shared/chunk-XEQ2XZLQ.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,487 @@
1
+ import { Type } from "@sinclair/typebox";
2
+ import { defineBrickManifest } from "~/shared/brick-manifest";
3
+ import { array, defineProps, group, optional } from "../props/helpers";
4
+ import { number } from "../props/number";
5
+ import { string, urlOrPageId, urlOrPageIdRef } from "../props/string";
6
+ import { VscLayoutPanelOff } from "react-icons/vsc";
7
+ import { image, imageRef } from "../props/image";
8
+ import { preset } from "../props/preset";
9
+ import type { BrickProps } from "../props/types";
10
+ import type { FC } from "react";
11
+ import { backgroundColorRef } from "../props/background";
12
+
13
+ export const manifest = defineBrickManifest({
14
+ type: "footer",
15
+ kind: "widget",
16
+ name: "Footer",
17
+ description: "A footer with links and an optional logo",
18
+ icon: VscLayoutPanelOff,
19
+ props: defineProps({
20
+ variants: Type.Array(
21
+ Type.Union(
22
+ [
23
+ Type.Literal("logo-left", { title: "Logo on the left", description: "Logo on the left" }),
24
+ Type.Literal("logo-right", { title: "Logo on the right", description: "Logo on the right" }),
25
+ Type.Literal("logo-center", { title: "Logo on the center", description: "Logo at center" }),
26
+ Type.Literal("multiple-rows", {
27
+ title: "Span on multiple rows.",
28
+ description: "Span on multiple rows. Use when there a a lot of links sections",
29
+ }),
30
+ ],
31
+ {
32
+ title: "Variant",
33
+ description: "Footer variants.",
34
+ },
35
+ ),
36
+ ),
37
+ backgroundColor: optional(backgroundColorRef()),
38
+ logo: optional(imageRef({ title: "Logo" })),
39
+ linksSections: array(
40
+ Type.Object({
41
+ sectionTitle: string("Links Section title"),
42
+ row: optional(number("Row", 0, { description: "Row number of the section" })),
43
+ links: array(
44
+ Type.Object({
45
+ title: string("Title"),
46
+ url: urlOrPageIdRef(),
47
+ column: optional(number("Column", 1)),
48
+ }),
49
+ ),
50
+ }),
51
+ ),
52
+ }),
53
+ });
54
+
55
+ export type Manifest = typeof manifest;
56
+
57
+ export const examples: {
58
+ description: string;
59
+ type: string;
60
+ props: BrickProps<Manifest>["brick"]["props"];
61
+ }[] = [
62
+ {
63
+ description: "Simple footer with logo on the left",
64
+ type: "footer",
65
+ props: {
66
+ variants: ["logo-left"],
67
+ backgroundColor: "#f8f9fa",
68
+ logo: {
69
+ src: "https://via.placeholder.com/120x40.png?text=Logo",
70
+ alt: "Company logo",
71
+ },
72
+ linksSections: [
73
+ {
74
+ sectionTitle: "Quick Links",
75
+ links: [
76
+ { title: "Home", url: "/" },
77
+ { title: "About", url: "/about" },
78
+ { title: "Contact", url: "/contact" },
79
+ ],
80
+ },
81
+ {
82
+ sectionTitle: "Legal",
83
+ links: [
84
+ { title: "Privacy Policy", url: "/privacy" },
85
+ { title: "Terms of Service", url: "/terms" },
86
+ ],
87
+ },
88
+ ],
89
+ },
90
+ },
91
+ {
92
+ description: "Corporate footer with centered logo",
93
+ type: "footer",
94
+ props: {
95
+ variants: ["logo-center"],
96
+ backgroundColor: "#2c3e50",
97
+ logo: {
98
+ src: "https://via.placeholder.com/150x50.png?text=Corporate",
99
+ alt: "Corporate logo",
100
+ },
101
+ linksSections: [
102
+ {
103
+ sectionTitle: "Products",
104
+ links: [
105
+ { title: "Software Solutions", url: "/products/software" },
106
+ { title: "Consulting", url: "/products/consulting" },
107
+ { title: "Support", url: "/products/support" },
108
+ { title: "Training", url: "/products/training" },
109
+ ],
110
+ },
111
+ {
112
+ sectionTitle: "Company",
113
+ links: [
114
+ { title: "About Us", url: "/about" },
115
+ { title: "Careers", url: "/careers" },
116
+ { title: "News", url: "/news" },
117
+ { title: "Investors", url: "/investors" },
118
+ ],
119
+ },
120
+ {
121
+ sectionTitle: "Resources",
122
+ links: [
123
+ { title: "Documentation", url: "/docs" },
124
+ { title: "API Reference", url: "/api" },
125
+ { title: "Community", url: "/community" },
126
+ { title: "Blog", url: "/blog" },
127
+ ],
128
+ },
129
+ ],
130
+ },
131
+ },
132
+ {
133
+ description: "E-commerce footer with logo on the right",
134
+ type: "footer",
135
+ props: {
136
+ variants: ["logo-right"],
137
+ backgroundColor: "#ffffff",
138
+ logo: {
139
+ src: "https://via.placeholder.com/140x45.png?text=Shop",
140
+ alt: "Shop logo",
141
+ },
142
+ linksSections: [
143
+ {
144
+ sectionTitle: "Shop",
145
+ links: [
146
+ { title: "All Products", url: "/products" },
147
+ { title: "New Arrivals", url: "/new" },
148
+ { title: "Sale", url: "/sale" },
149
+ { title: "Gift Cards", url: "/gift-cards" },
150
+ ],
151
+ },
152
+ {
153
+ sectionTitle: "Customer Service",
154
+ links: [
155
+ { title: "Help Center", url: "/help" },
156
+ { title: "Returns", url: "/returns" },
157
+ { title: "Shipping Info", url: "/shipping" },
158
+ { title: "Size Guide", url: "/size-guide" },
159
+ ],
160
+ },
161
+ {
162
+ sectionTitle: "Account",
163
+ links: [
164
+ { title: "My Account", url: "/account" },
165
+ { title: "Order History", url: "/orders" },
166
+ { title: "Wishlist", url: "/wishlist" },
167
+ ],
168
+ },
169
+ ],
170
+ },
171
+ },
172
+ {
173
+ description: "Large organization footer with multiple rows",
174
+ type: "footer",
175
+ props: {
176
+ variants: ["logo-center", "multiple-rows"],
177
+ backgroundColor: "#1a1a1a",
178
+ logo: {
179
+ src: "https://via.placeholder.com/180x60.png?text=Enterprise",
180
+ alt: "Enterprise logo",
181
+ },
182
+ linksSections: [
183
+ {
184
+ sectionTitle: "Products & Services",
185
+ row: 0,
186
+ links: [
187
+ { title: "Cloud Solutions", url: "/cloud", column: 1 },
188
+ { title: "Data Analytics", url: "/analytics", column: 1 },
189
+ { title: "AI & Machine Learning", url: "/ai", column: 1 },
190
+ { title: "Cybersecurity", url: "/security", column: 2 },
191
+ { title: "DevOps Tools", url: "/devops", column: 2 },
192
+ { title: "IoT Platform", url: "/iot", column: 2 },
193
+ ],
194
+ },
195
+ {
196
+ sectionTitle: "Industries",
197
+ row: 0,
198
+ links: [
199
+ { title: "Healthcare", url: "/industries/healthcare", column: 3 },
200
+ { title: "Finance", url: "/industries/finance", column: 3 },
201
+ { title: "Retail", url: "/industries/retail", column: 3 },
202
+ { title: "Manufacturing", url: "/industries/manufacturing", column: 4 },
203
+ { title: "Education", url: "/industries/education", column: 4 },
204
+ { title: "Government", url: "/industries/government", column: 4 },
205
+ ],
206
+ },
207
+ {
208
+ sectionTitle: "Resources",
209
+ row: 1,
210
+ links: [
211
+ { title: "Documentation", url: "/docs", column: 1 },
212
+ { title: "API Reference", url: "/api", column: 1 },
213
+ { title: "Tutorials", url: "/tutorials", column: 1 },
214
+ { title: "Webinars", url: "/webinars", column: 2 },
215
+ { title: "White Papers", url: "/whitepapers", column: 2 },
216
+ { title: "Case Studies", url: "/case-studies", column: 2 },
217
+ ],
218
+ },
219
+ {
220
+ sectionTitle: "Support & Community",
221
+ row: 1,
222
+ links: [
223
+ { title: "Help Center", url: "/help", column: 3 },
224
+ { title: "Community Forum", url: "/forum", column: 3 },
225
+ { title: "Contact Support", url: "/support", column: 3 },
226
+ { title: "Service Status", url: "/status", column: 4 },
227
+ { title: "Partner Portal", url: "/partners", column: 4 },
228
+ { title: "Developer Hub", url: "/developers", column: 4 },
229
+ ],
230
+ },
231
+ ],
232
+ },
233
+ },
234
+ {
235
+ description: "Startup footer with minimal links and left logo",
236
+ type: "footer",
237
+ props: {
238
+ variants: ["logo-left"],
239
+ backgroundColor: "#f5f5f5",
240
+ logo: {
241
+ src: "https://via.placeholder.com/100x35.png?text=Startup",
242
+ alt: "Startup logo",
243
+ },
244
+ linksSections: [
245
+ {
246
+ sectionTitle: "Company",
247
+ links: [
248
+ { title: "About", url: "/about" },
249
+ { title: "Team", url: "/team" },
250
+ { title: "Jobs", url: "/jobs" },
251
+ ],
252
+ },
253
+ {
254
+ sectionTitle: "Product",
255
+ links: [
256
+ { title: "Features", url: "/features" },
257
+ { title: "Pricing", url: "/pricing" },
258
+ { title: "Demo", url: "/demo" },
259
+ ],
260
+ },
261
+ {
262
+ sectionTitle: "Support",
263
+ links: [
264
+ { title: "Help", url: "/help" },
265
+ { title: "Contact", url: "/contact" },
266
+ ],
267
+ },
268
+ ],
269
+ },
270
+ },
271
+ {
272
+ description: "Agency footer with centered logo and creative sections",
273
+ type: "footer",
274
+ props: {
275
+ variants: ["logo-center"],
276
+ backgroundColor: "#6366f1",
277
+ logo: {
278
+ src: "https://via.placeholder.com/130x45.png?text=Agency",
279
+ alt: "Creative agency logo",
280
+ },
281
+ linksSections: [
282
+ {
283
+ sectionTitle: "Services",
284
+ links: [
285
+ { title: "Web Design", url: "/services/web-design" },
286
+ { title: "Branding", url: "/services/branding" },
287
+ { title: "Digital Marketing", url: "/services/marketing" },
288
+ { title: "Photography", url: "/services/photography" },
289
+ ],
290
+ },
291
+ {
292
+ sectionTitle: "Portfolio",
293
+ links: [
294
+ { title: "Recent Work", url: "/portfolio" },
295
+ { title: "Case Studies", url: "/case-studies" },
296
+ { title: "Client Reviews", url: "/reviews" },
297
+ ],
298
+ },
299
+ {
300
+ sectionTitle: "Connect",
301
+ links: [
302
+ { title: "Contact Us", url: "/contact" },
303
+ { title: "Get Quote", url: "/quote" },
304
+ { title: "Newsletter", url: "/newsletter" },
305
+ ],
306
+ },
307
+ ],
308
+ },
309
+ },
310
+ {
311
+ description: "SaaS platform footer with comprehensive links",
312
+ type: "footer",
313
+ props: {
314
+ variants: ["logo-left", "multiple-rows"],
315
+ backgroundColor: "#0f172a",
316
+ logo: {
317
+ src: "https://via.placeholder.com/160x50.png?text=SaaS+Platform",
318
+ alt: "SaaS platform logo",
319
+ },
320
+ linksSections: [
321
+ {
322
+ sectionTitle: "Platform",
323
+ row: 0,
324
+ links: [
325
+ { title: "Dashboard", url: "/dashboard", column: 1 },
326
+ { title: "Analytics", url: "/analytics", column: 1 },
327
+ { title: "Integrations", url: "/integrations", column: 1 },
328
+ { title: "API", url: "/api", column: 1 },
329
+ ],
330
+ },
331
+ {
332
+ sectionTitle: "Solutions",
333
+ row: 0,
334
+ links: [
335
+ { title: "For Startups", url: "/solutions/startups", column: 2 },
336
+ { title: "For Enterprise", url: "/solutions/enterprise", column: 2 },
337
+ { title: "For Agencies", url: "/solutions/agencies", column: 2 },
338
+ { title: "For Developers", url: "/solutions/developers", column: 2 },
339
+ ],
340
+ },
341
+ {
342
+ sectionTitle: "Resources",
343
+ row: 1,
344
+ links: [
345
+ { title: "Blog", url: "/blog", column: 1 },
346
+ { title: "Documentation", url: "/docs", column: 1 },
347
+ { title: "Help Center", url: "/help", column: 1 },
348
+ { title: "Community", url: "/community", column: 1 },
349
+ ],
350
+ },
351
+ {
352
+ sectionTitle: "Company",
353
+ row: 1,
354
+ links: [
355
+ { title: "About Us", url: "/about", column: 2 },
356
+ { title: "Careers", url: "/careers", column: 2 },
357
+ { title: "Press", url: "/press", column: 2 },
358
+ { title: "Legal", url: "/legal", column: 2 },
359
+ ],
360
+ },
361
+ ],
362
+ },
363
+ },
364
+ {
365
+ description: "Non-profit footer with mission-focused links",
366
+ type: "footer",
367
+ props: {
368
+ variants: ["logo-center"],
369
+ backgroundColor: "#059669",
370
+ logo: {
371
+ src: "https://via.placeholder.com/140x50.png?text=Non+Profit",
372
+ alt: "Non-profit organization logo",
373
+ },
374
+ linksSections: [
375
+ {
376
+ sectionTitle: "Our Work",
377
+ links: [
378
+ { title: "Programs", url: "/programs" },
379
+ { title: "Impact", url: "/impact" },
380
+ { title: "Success Stories", url: "/stories" },
381
+ { title: "Research", url: "/research" },
382
+ ],
383
+ },
384
+ {
385
+ sectionTitle: "Get Involved",
386
+ links: [
387
+ { title: "Donate", url: "/donate" },
388
+ { title: "Volunteer", url: "/volunteer" },
389
+ { title: "Events", url: "/events" },
390
+ { title: "Partner with Us", url: "/partnerships" },
391
+ ],
392
+ },
393
+ {
394
+ sectionTitle: "About",
395
+ links: [
396
+ { title: "Our Mission", url: "/mission" },
397
+ { title: "Leadership", url: "/leadership" },
398
+ { title: "Annual Reports", url: "/reports" },
399
+ { title: "Contact", url: "/contact" },
400
+ ],
401
+ },
402
+ ],
403
+ },
404
+ },
405
+ {
406
+ description: "Tech blog footer with right-aligned logo",
407
+ type: "footer",
408
+ props: {
409
+ variants: ["logo-right"],
410
+ backgroundColor: "#111827",
411
+ logo: {
412
+ src: "https://via.placeholder.com/120x40.png?text=Tech+Blog",
413
+ alt: "Tech blog logo",
414
+ },
415
+ linksSections: [
416
+ {
417
+ sectionTitle: "Categories",
418
+ links: [
419
+ { title: "Web Development", url: "/category/web-dev" },
420
+ { title: "AI & ML", url: "/category/ai-ml" },
421
+ { title: "DevOps", url: "/category/devops" },
422
+ { title: "Mobile", url: "/category/mobile" },
423
+ ],
424
+ },
425
+ {
426
+ sectionTitle: "Popular",
427
+ links: [
428
+ { title: "Latest Posts", url: "/latest" },
429
+ { title: "Trending", url: "/trending" },
430
+ { title: "Best of 2024", url: "/best-2024" },
431
+ { title: "Tutorials", url: "/tutorials" },
432
+ ],
433
+ },
434
+ {
435
+ sectionTitle: "Community",
436
+ links: [
437
+ { title: "Newsletter", url: "/newsletter" },
438
+ { title: "Discord", url: "/discord" },
439
+ { title: "Contributors", url: "/contributors" },
440
+ { title: "Write for Us", url: "/write" },
441
+ ],
442
+ },
443
+ ],
444
+ },
445
+ },
446
+ {
447
+ description: "Restaurant footer with location and menu links",
448
+ type: "footer",
449
+ props: {
450
+ variants: ["logo-center"],
451
+ backgroundColor: "#7c2d12",
452
+ logo: {
453
+ src: "https://via.placeholder.com/150x60.png?text=Restaurant",
454
+ alt: "Restaurant logo",
455
+ },
456
+ linksSections: [
457
+ {
458
+ sectionTitle: "Menu",
459
+ links: [
460
+ { title: "Appetizers", url: "/menu/appetizers" },
461
+ { title: "Main Courses", url: "/menu/mains" },
462
+ { title: "Desserts", url: "/menu/desserts" },
463
+ { title: "Beverages", url: "/menu/drinks" },
464
+ ],
465
+ },
466
+ {
467
+ sectionTitle: "Services",
468
+ links: [
469
+ { title: "Reservations", url: "/reservations" },
470
+ { title: "Catering", url: "/catering" },
471
+ { title: "Private Events", url: "/events" },
472
+ { title: "Gift Cards", url: "/gift-cards" },
473
+ ],
474
+ },
475
+ {
476
+ sectionTitle: "Info",
477
+ links: [
478
+ { title: "About Us", url: "/about" },
479
+ { title: "Location", url: "/location" },
480
+ { title: "Hours", url: "/hours" },
481
+ { title: "Contact", url: "/contact" },
482
+ ],
483
+ },
484
+ ],
485
+ },
486
+ },
487
+ ];
@@ -0,0 +1,112 @@
1
+ import { defineBrickManifest } from "~/shared/brick-manifest";
2
+ import { defineProps, optional, prop } from "../props/helpers";
3
+ import { FaWpforms } from "react-icons/fa6";
4
+ import { Type } from "@sinclair/typebox";
5
+ import { string } from "../props/string";
6
+ import type { BrickProps } from "../props/types";
7
+ import { StringDecoder } from "node:string_decoder";
8
+ import { StringEnum } from "~/shared/utils/schema";
9
+ import type { FC } from "react";
10
+ import { paddingRef } from "../props/padding";
11
+ import { backgroundColorRef } from "../props/background";
12
+ import { colorRef } from "../props/color";
13
+
14
+ export const manifest = defineBrickManifest({
15
+ type: "form",
16
+ kind: "widget",
17
+ name: "Form",
18
+ description: "A form element",
19
+ aiInstructions: `The form brick automatically renders form fields based on the datarecord id provided in the props.
20
+ There is no need to define the form fields manually and the form does not accept any children`,
21
+ isContainer: false,
22
+ icon: FaWpforms,
23
+ props: defineProps({
24
+ title: optional(string("Title", "My form", { description: "The title of the form" })),
25
+ intro: optional(string("Intro", undefined, { description: "The intro text of the form" })),
26
+ datarecordId: string("Datarecord ID", undefined, {
27
+ description: "The ID of the datarecord to use to generate the form fields",
28
+ }),
29
+ padding: optional(paddingRef),
30
+ backgroundColor: optional(backgroundColorRef()),
31
+ color: optional(colorRef()),
32
+ align: optional(
33
+ prop({
34
+ title: "Alignment",
35
+ description: "The alignment of the form fields. Default is vertical",
36
+ schema: StringEnum(["vertical", "horizontal"], {
37
+ default: "vertical",
38
+ title: "Form alignment",
39
+ description: "Choose between vertical or horizontal alignment for the form fields",
40
+ }),
41
+ }),
42
+ ),
43
+ }),
44
+ });
45
+
46
+ export type Manifest = typeof manifest;
47
+ export const examples: {
48
+ description: string;
49
+ type: string;
50
+ props: BrickProps<Manifest>["brick"]["props"];
51
+ }[] = [
52
+ {
53
+ description: "Basic contact form",
54
+ type: "form",
55
+ props: {
56
+ title: "Contact Us",
57
+ intro: "We'd love to hear from you. Send us a message and we'll respond as soon as possible.",
58
+ align: "vertical",
59
+ datarecordId: "contacts",
60
+ },
61
+ },
62
+ {
63
+ description: "User registration form",
64
+ type: "form",
65
+ props: {
66
+ title: "Create Account",
67
+ intro: "Join our platform and start your journey today.",
68
+ align: "vertical",
69
+ datarecordId: "user-registration",
70
+ },
71
+ },
72
+ {
73
+ description: "Newsletter subscription form (horizontal)",
74
+ type: "form",
75
+ props: {
76
+ title: "Stay Updated",
77
+ intro: "Subscribe to our newsletter for the latest updates and exclusive content.",
78
+ align: "horizontal",
79
+ datarecordId: "newsletter-subscription",
80
+ },
81
+ },
82
+ {
83
+ description: "Event registration form",
84
+ type: "form",
85
+ props: {
86
+ title: "Conference Registration",
87
+ intro: "Register for the Annual Tech Conference 2025. Early bird pricing ends soon!",
88
+ align: "vertical",
89
+ datarecordId: "event-registration",
90
+ },
91
+ },
92
+ {
93
+ description: "Job application form",
94
+ type: "form",
95
+ props: {
96
+ title: "Apply for Position",
97
+ intro: "We're excited to learn more about you! Please fill out this application form completely.",
98
+ align: "vertical",
99
+ datarecordId: "job-application",
100
+ },
101
+ },
102
+ {
103
+ description: "Customer feedback form",
104
+ type: "form",
105
+ props: {
106
+ title: "Share Your Feedback",
107
+ intro: "Your opinion matters to us. Help us improve our products and services.",
108
+ align: "vertical",
109
+ datarecordId: "customer-feedback",
110
+ },
111
+ },
112
+ ];