@upstart.gg/sdk 0.0.104 → 0.0.106

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 (254) hide show
  1. package/dist/shared/ajv.d.ts +2 -0
  2. package/dist/shared/ajv.d.ts.map +1 -1
  3. package/dist/shared/ajv.js +1 -1
  4. package/dist/shared/attributes.js +1 -1
  5. package/dist/shared/brick-manifest.js +1 -1
  6. package/dist/shared/bricks/manifests/accordion.manifest.js +1 -1
  7. package/dist/shared/bricks/manifests/all-manifests.js +1 -1
  8. package/dist/shared/bricks/manifests/button.manifest.js +1 -1
  9. package/dist/shared/bricks/manifests/card.manifest.js +1 -1
  10. package/dist/shared/bricks/manifests/carousel.manifest.js +1 -1
  11. package/dist/shared/bricks/manifests/container.manifest.js +1 -1
  12. package/dist/shared/bricks/manifests/divider.manifest.js +1 -1
  13. package/dist/shared/bricks/manifests/footer.manifest.d.ts +1 -1
  14. package/dist/shared/bricks/manifests/footer.manifest.d.ts.map +1 -1
  15. package/dist/shared/bricks/manifests/footer.manifest.js +1 -1
  16. package/dist/shared/bricks/manifests/form.manifest.js +1 -1
  17. package/dist/shared/bricks/manifests/hero.manifest.js +1 -1
  18. package/dist/shared/bricks/manifests/icon.manifest.js +1 -1
  19. package/dist/shared/bricks/manifests/image.manifest.js +1 -1
  20. package/dist/shared/bricks/manifests/images-gallery.manifest.js +1 -1
  21. package/dist/shared/bricks/manifests/map.manifest.js +1 -1
  22. package/dist/shared/bricks/manifests/navbar.manifest.js +1 -1
  23. package/dist/shared/bricks/manifests/sidebar.manifest.js +1 -1
  24. package/dist/shared/bricks/manifests/social-links.manifest.js +1 -1
  25. package/dist/shared/bricks/manifests/testimonials.manifest.js +1 -1
  26. package/dist/shared/bricks/manifests/text.manifest.js +1 -1
  27. package/dist/shared/bricks/manifests/timeline.manifest.js +1 -1
  28. package/dist/shared/bricks/manifests/video.manifest.js +1 -1
  29. package/dist/shared/bricks/props/border.d.ts.map +1 -1
  30. package/dist/shared/bricks/props/border.js +1 -1
  31. package/dist/shared/bricks/props/container.js +1 -1
  32. package/dist/shared/bricks/props/effects.js +1 -1
  33. package/dist/shared/bricks.d.ts.map +1 -1
  34. package/dist/shared/bricks.js +1 -1
  35. package/dist/shared/{chunk-TCZBR3ZU.js → chunk-2DI5SIVV.js} +1 -1
  36. package/dist/shared/{chunk-O22VV7YR.js → chunk-33FU4KGU.js} +1 -1
  37. package/dist/shared/{chunk-WCNVFVDK.js → chunk-3ZGRY444.js} +1 -1
  38. package/dist/shared/{chunk-CUCUHPQ7.js → chunk-6OKXZL6R.js} +1 -1
  39. package/dist/shared/chunk-7E67XSKP.js +3 -0
  40. package/dist/shared/{chunk-LJQXN32B.js → chunk-AMGHA7QH.js} +1 -1
  41. package/dist/shared/{chunk-QALNFBY7.js → chunk-DC5DWF7B.js} +1 -1
  42. package/dist/shared/{chunk-I43NIQ2K.js → chunk-DY2YCYZ6.js} +1 -1
  43. package/dist/shared/{chunk-CEXHD4BO.js → chunk-E4UAVLKC.js} +2 -2
  44. package/dist/shared/{chunk-ZFTWLZ3G.js → chunk-EHH677K5.js} +1 -1
  45. package/dist/shared/{chunk-POYVTV5F.js → chunk-FD3KX2U7.js} +1 -1
  46. package/dist/shared/chunk-G3JO5DM5.js +3 -0
  47. package/dist/shared/{chunk-I5S2MPPR.js → chunk-H7OYUKBW.js} +1 -1
  48. package/dist/shared/{chunk-ATVHWZSA.js → chunk-HBM4DPIW.js} +1 -1
  49. package/dist/shared/chunk-HIBTEX2T.js +3 -0
  50. package/dist/shared/{chunk-E2EBTWJI.js → chunk-I3HSLGFA.js} +1 -1
  51. package/dist/shared/{chunk-UISES3HA.js → chunk-IXJX7EQ3.js} +1 -1
  52. package/dist/shared/{chunk-5IEGQ7YT.js → chunk-JAAPJQNK.js} +1 -1
  53. package/dist/shared/{chunk-UK6H3FDX.js → chunk-JDBVMPSI.js} +1 -1
  54. package/dist/shared/{chunk-F6MLW6DO.js → chunk-JH3NRO6M.js} +1 -1
  55. package/dist/shared/{chunk-ZNVRYEO7.js → chunk-L3TKLJKK.js} +1 -1
  56. package/dist/shared/{chunk-TEPFFY32.js → chunk-LOFXGDAK.js} +1 -1
  57. package/dist/shared/chunk-O3FJP65T.js +3 -0
  58. package/dist/shared/{chunk-7L3UOEMR.js → chunk-PX7QSNLO.js} +1 -1
  59. package/dist/shared/{chunk-22KRCQK5.js → chunk-U76JDFWJ.js} +1 -1
  60. package/dist/shared/{chunk-CW5FWW5W.js → chunk-UYZP24VV.js} +1 -1
  61. package/dist/shared/chunk-X42WBJTN.js +3 -0
  62. package/dist/shared/{chunk-OQIFFJ7I.js → chunk-XB3X4P3I.js} +1 -1
  63. package/dist/shared/chunk-XDCGA4WT.js +3 -0
  64. package/dist/shared/chunk-YGHBFXR6.js +3 -0
  65. package/dist/shared/{chunk-WEQRYCPD.js → chunk-ZWYLKIBI.js} +1 -1
  66. package/dist/shared/datasources/external/rss/fetcher.d.ts +1 -1
  67. package/dist/shared/datasources/external/rss/fetcher.d.ts.map +1 -1
  68. package/dist/shared/images.js +1 -1
  69. package/dist/shared/page.js +1 -1
  70. package/dist/shared/responsive.js +1 -1
  71. package/dist/shared/site.js +1 -1
  72. package/dist/shared/sitemap.js +1 -1
  73. package/dist/shared/theme.js +1 -1
  74. package/dist/shared/utils/schema.d.ts +6 -8
  75. package/dist/shared/utils/schema.d.ts.map +1 -1
  76. package/dist/shared/utils/schema.js +1 -1
  77. package/package.json +5 -9
  78. package/dist/shared/chunk-F63ANNAK.js +0 -3
  79. package/dist/shared/chunk-GPKRRX3D.js +0 -3
  80. package/dist/shared/chunk-HQQYIKTE.js +0 -3
  81. package/dist/shared/chunk-JFDOR3UH.js +0 -3
  82. package/dist/shared/chunk-OD2PRCLH.js +0 -3
  83. package/dist/shared/chunk-PK6UAFPW.js +0 -3
  84. package/dist/shared/chunk-VDHLON5R.js +0 -3
  85. package/src/node/cli/api.ts +0 -101
  86. package/src/node/cli/commands/cmd-build.ts +0 -64
  87. package/src/node/cli/commands/login/cmd-login.ts +0 -111
  88. package/src/node/cli/commands/logout/cmd-logout.ts +0 -11
  89. package/src/node/cli/commands/publish/cmd-publish.ts +0 -135
  90. package/src/node/cli/commands/publish/parse-gitignore.ts +0 -278
  91. package/src/node/cli/commands/publish/uploader.ts +0 -333
  92. package/src/node/cli/constants.ts +0 -14
  93. package/src/node/cli/is-logged-in.ts +0 -28
  94. package/src/node/cli/program.ts +0 -77
  95. package/src/node/cli/store.ts +0 -64
  96. package/src/node/cli/tests/api.test.ts +0 -161
  97. package/src/node/cli/types.ts +0 -34
  98. package/src/node/cli/utils.ts +0 -20
  99. package/src/node/shared/config.ts +0 -69
  100. package/src/node/shared/logger.ts +0 -44
  101. package/src/shared/ajv.ts +0 -103
  102. package/src/shared/analytics/init.ts +0 -14
  103. package/src/shared/analytics/track.ts +0 -21
  104. package/src/shared/analytics/types.ts +0 -13
  105. package/src/shared/attributes.ts +0 -211
  106. package/src/shared/brick-manifest.ts +0 -110
  107. package/src/shared/bricks/manifests/accordion.manifest.ts +0 -179
  108. package/src/shared/bricks/manifests/all-manifests.ts +0 -92
  109. package/src/shared/bricks/manifests/button.manifest.ts +0 -145
  110. package/src/shared/bricks/manifests/card.manifest.ts +0 -269
  111. package/src/shared/bricks/manifests/carousel.manifest.ts +0 -106
  112. package/src/shared/bricks/manifests/container.manifest.ts +0 -357
  113. package/src/shared/bricks/manifests/divider.manifest.ts +0 -121
  114. package/src/shared/bricks/manifests/footer.manifest.ts +0 -487
  115. package/src/shared/bricks/manifests/form.manifest.ts +0 -112
  116. package/src/shared/bricks/manifests/hero.manifest.ts +0 -132
  117. package/src/shared/bricks/manifests/icon.manifest.ts +0 -130
  118. package/src/shared/bricks/manifests/image.manifest.ts +0 -203
  119. package/src/shared/bricks/manifests/images-gallery.manifest.ts +0 -227
  120. package/src/shared/bricks/manifests/map.manifest.ts +0 -75
  121. package/src/shared/bricks/manifests/navbar.manifest.ts +0 -344
  122. package/src/shared/bricks/manifests/sidebar.manifest.ts +0 -90
  123. package/src/shared/bricks/manifests/social-links.manifest.ts +0 -370
  124. package/src/shared/bricks/manifests/testimonials.manifest.ts +0 -397
  125. package/src/shared/bricks/manifests/tests/header.manifest.test.ts +0 -10
  126. package/src/shared/bricks/manifests/text.manifest.ts +0 -164
  127. package/src/shared/bricks/manifests/timeline.manifest.ts +0 -456
  128. package/src/shared/bricks/manifests/video.manifest.ts +0 -59
  129. package/src/shared/bricks/props/_style-presets.ts +0 -352
  130. package/src/shared/bricks/props/align.ts +0 -59
  131. package/src/shared/bricks/props/background.ts +0 -118
  132. package/src/shared/bricks/props/boolean.ts +0 -11
  133. package/src/shared/bricks/props/border.ts +0 -84
  134. package/src/shared/bricks/props/color.ts +0 -24
  135. package/src/shared/bricks/props/common.ts +0 -37
  136. package/src/shared/bricks/props/container.ts +0 -356
  137. package/src/shared/bricks/props/css-length.ts +0 -25
  138. package/src/shared/bricks/props/datasource.ts +0 -60
  139. package/src/shared/bricks/props/date.ts +0 -24
  140. package/src/shared/bricks/props/effects.ts +0 -123
  141. package/src/shared/bricks/props/enum.ts +0 -42
  142. package/src/shared/bricks/props/file.ts +0 -12
  143. package/src/shared/bricks/props/geolocation.ts +0 -30
  144. package/src/shared/bricks/props/helpers.ts +0 -101
  145. package/src/shared/bricks/props/image.ts +0 -90
  146. package/src/shared/bricks/props/number.ts +0 -16
  147. package/src/shared/bricks/props/padding.ts +0 -21
  148. package/src/shared/bricks/props/position.ts +0 -27
  149. package/src/shared/bricks/props/preset.ts +0 -136
  150. package/src/shared/bricks/props/string.ts +0 -56
  151. package/src/shared/bricks/props/tests/align.test.ts +0 -37
  152. package/src/shared/bricks/props/tests/background.test.ts +0 -102
  153. package/src/shared/bricks/props/tests/border.test.ts +0 -38
  154. package/src/shared/bricks/props/tests/effects.test.ts +0 -37
  155. package/src/shared/bricks/props/tests/helpers.test.ts +0 -133
  156. package/src/shared/bricks/props/tests/image.test.ts +0 -71
  157. package/src/shared/bricks/props/tests/padding.ts +0 -12
  158. package/src/shared/bricks/props/tests/string.test.ts +0 -79
  159. package/src/shared/bricks/props/text.ts +0 -66
  160. package/src/shared/bricks/props/types.ts +0 -57
  161. package/src/shared/bricks.ts +0 -232
  162. package/src/shared/context.ts +0 -39
  163. package/src/shared/datarecords/external/airtable/handler.ts +0 -21
  164. package/src/shared/datarecords/external/airtable/options.ts +0 -22
  165. package/src/shared/datarecords/external/generic-webhook/handler.ts +0 -10
  166. package/src/shared/datarecords/external/generic-webhook/options.ts +0 -13
  167. package/src/shared/datarecords/external/google/oauth/config.ts +0 -30
  168. package/src/shared/datarecords/external/google/sheets/handler.ts +0 -26
  169. package/src/shared/datarecords/external/google/sheets/options.ts +0 -9
  170. package/src/shared/datarecords/types.ts +0 -120
  171. package/src/shared/datarecords.ts +0 -5
  172. package/src/shared/datasources/README.md +0 -3
  173. package/src/shared/datasources/external/facebook/posts/fetcher.ts +0 -52
  174. package/src/shared/datasources/external/facebook/posts/sample.ts +0 -35
  175. package/src/shared/datasources/external/facebook/posts/schema.ts +0 -33
  176. package/src/shared/datasources/external/facebook/posts/tests/fetcher.test.ts +0 -73
  177. package/src/shared/datasources/external/http-json/fetcher.ts +0 -28
  178. package/src/shared/datasources/external/http-json/options.ts +0 -12
  179. package/src/shared/datasources/external/http-json/schema.ts +0 -6
  180. package/src/shared/datasources/external/http-json/tests/fetcher.test.ts +0 -70
  181. package/src/shared/datasources/external/instagram/feed/fetcher.ts +0 -33
  182. package/src/shared/datasources/external/instagram/feed/sample.ts +0 -22
  183. package/src/shared/datasources/external/instagram/feed/schema.ts +0 -23
  184. package/src/shared/datasources/external/instagram/feed/tests/fetcher.test.ts +0 -64
  185. package/src/shared/datasources/external/mastodon/account/fetcher.ts +0 -24
  186. package/src/shared/datasources/external/mastodon/account/sample.ts +0 -33
  187. package/src/shared/datasources/external/mastodon/account/schema.ts +0 -45
  188. package/src/shared/datasources/external/mastodon/account/tests/fetcher.test.ts +0 -47
  189. package/src/shared/datasources/external/mastodon/options.ts +0 -11
  190. package/src/shared/datasources/external/mastodon/status/fetcher.ts +0 -35
  191. package/src/shared/datasources/external/mastodon/status/sample.array.ts +0 -59
  192. package/src/shared/datasources/external/mastodon/status/sample.single.ts +0 -55
  193. package/src/shared/datasources/external/mastodon/status/schema.ts +0 -130
  194. package/src/shared/datasources/external/mastodon/status/tests/fetcher.test.ts +0 -74
  195. package/src/shared/datasources/external/meta/oauth/config.ts +0 -16
  196. package/src/shared/datasources/external/meta/options.ts +0 -11
  197. package/src/shared/datasources/external/rss/fetcher.ts +0 -29
  198. package/src/shared/datasources/external/rss/options.ts +0 -11
  199. package/src/shared/datasources/external/rss/sample.ts +0 -22
  200. package/src/shared/datasources/external/rss/schema.ts +0 -42
  201. package/src/shared/datasources/external/threads/media/fetcher.ts +0 -53
  202. package/src/shared/datasources/external/threads/media/sample.ts +0 -44
  203. package/src/shared/datasources/external/threads/media/schema.ts +0 -37
  204. package/src/shared/datasources/external/tiktok/oauth/config.ts +0 -17
  205. package/src/shared/datasources/external/tiktok/video/fetcher.ts +0 -39
  206. package/src/shared/datasources/external/tiktok/video/options.ts +0 -12
  207. package/src/shared/datasources/external/tiktok/video/sample.ts +0 -26
  208. package/src/shared/datasources/external/tiktok/video/schema.ts +0 -27
  209. package/src/shared/datasources/external/youtube/list/fetcher.ts +0 -37
  210. package/src/shared/datasources/external/youtube/list/options.ts +0 -15
  211. package/src/shared/datasources/external/youtube/list/sample.ts +0 -33
  212. package/src/shared/datasources/external/youtube/list/schema.ts +0 -38
  213. package/src/shared/datasources/external/youtube/oauth/config.ts +0 -15
  214. package/src/shared/datasources/fetcher.ts +0 -17
  215. package/src/shared/datasources/internal/blog/schema.ts +0 -69
  216. package/src/shared/datasources/internal/changelog/schema.ts +0 -48
  217. package/src/shared/datasources/internal/contact-info/schema.ts +0 -20
  218. package/src/shared/datasources/internal/cv/schema.ts +0 -217
  219. package/src/shared/datasources/internal/faq/schema.ts +0 -27
  220. package/src/shared/datasources/internal/job-board/schema.ts +0 -228
  221. package/src/shared/datasources/internal/links/schema.ts +0 -15
  222. package/src/shared/datasources/internal/recipes/schema.ts +0 -42
  223. package/src/shared/datasources/internal/restaurant/schema.ts +0 -225
  224. package/src/shared/datasources/provider-options.ts +0 -7
  225. package/src/shared/datasources/samples.ts +0 -26
  226. package/src/shared/datasources/schemas.ts +0 -45
  227. package/src/shared/datasources/types.ts +0 -276
  228. package/src/shared/datasources/utils.ts +0 -16
  229. package/src/shared/datasources.ts +0 -42
  230. package/src/shared/env.ts +0 -23
  231. package/src/shared/errors.ts +0 -1
  232. package/src/shared/images.ts +0 -44
  233. package/src/shared/index.ts +0 -3
  234. package/src/shared/layout-constants.ts +0 -25
  235. package/src/shared/manifest.ts +0 -50
  236. package/src/shared/oauth.ts +0 -16
  237. package/src/shared/page.ts +0 -61
  238. package/src/shared/prompt.ts +0 -9
  239. package/src/shared/responsive.ts +0 -5
  240. package/src/shared/site.ts +0 -97
  241. package/src/shared/sitemap.ts +0 -66
  242. package/src/shared/social-icons.ts +0 -307
  243. package/src/shared/tests/attributes.test.ts +0 -37
  244. package/src/shared/theme.ts +0 -245
  245. package/src/shared/themes/README.md +0 -34
  246. package/src/shared/themes/color-system.ts +0 -127
  247. package/src/shared/utils/canvas-data-uri.ts +0 -2
  248. package/src/shared/utils/invariant.ts +0 -25
  249. package/src/shared/utils/json-date.ts +0 -8
  250. package/src/shared/utils/merge.ts +0 -12
  251. package/src/shared/utils/object-hash.ts +0 -7
  252. package/src/shared/utils/schema.ts +0 -35
  253. package/src/shared/utils/try-catch.ts +0 -12
  254. package/src/shared/utils/typed-ref.ts +0 -41
@@ -1,132 +0,0 @@
1
- import { defineBrickManifest } from "~/shared/brick-manifest";
2
- import { defineProps, group, optional } from "../props/helpers";
3
- import { basicAlign, basicAlignRef } from "../props/align";
4
- import { background, backgroundRef } from "../props/background";
5
- import { border, borderRef } from "../props/border";
6
- import { textContent, textContentRef } from "../props/text";
7
- import { padding, paddingRef } from "../props/padding";
8
- import { BsAlphabetUppercase } from "react-icons/bs";
9
- import { preset } from "../props/preset";
10
- import type { BrickProps } from "../props/types";
11
- import { colorRef } from "../props/color";
12
- import type { FC } from "react";
13
- import type { Type } from "@sinclair/typebox";
14
- import { shadowRef } from "../props/effects";
15
-
16
- export const manifest = defineBrickManifest({
17
- type: "hero",
18
- name: "Hero",
19
- kind: "brick",
20
- description: "A big textual element for home pages",
21
- aiInstructions: `
22
- This hero element is a large text element that can be used to display a title and an optional tagline.
23
- It is typically used on home pages to grab the user's attention.
24
- `.trim(),
25
- icon: BsAlphabetUppercase,
26
-
27
- defaultHeight: { desktop: 5, mobile: 5 },
28
- defaultWidth: { desktop: 12, mobile: 12 },
29
-
30
- props: defineProps(
31
- {
32
- content: textContentRef({ title: "Hero title", default: "I'm a big text" }),
33
- tagline: optional(textContentRef({ title: "Hero tagline", default: "I'm a tagline" })),
34
- background: optional(backgroundRef()),
35
- color: optional(colorRef()),
36
- shadow: optional(shadowRef()),
37
- align: optional(basicAlignRef()),
38
- padding: optional(paddingRef),
39
- border: optional(borderRef),
40
- },
41
- {
42
- default: {
43
- padding: "p-4",
44
- },
45
- },
46
- ),
47
- });
48
-
49
- export type Manifest = typeof manifest;
50
- export const examples: {
51
- description: string;
52
- type: string;
53
- props: BrickProps<Manifest>["brick"]["props"];
54
- }[] = [
55
- {
56
- description: "Simple welcome hero with blue background",
57
- type: "hero",
58
- props: {
59
- preset: "prominent-primary",
60
- content: "Welcome to Our Platform",
61
- tagline: "The future of productivity starts here",
62
- align: {
63
- horizontal: "justify-center",
64
- },
65
- padding: "p-8",
66
- },
67
- },
68
- {
69
- description: "Startup hero with gradient background",
70
- type: "hero",
71
- props: {
72
- preset: "prominent-secondary",
73
- content: "Build Something Amazing",
74
- tagline: "Turn your ideas into reality with our cutting-edge tools",
75
- align: {
76
- horizontal: "justify-center",
77
- },
78
- padding: "p-16",
79
- },
80
- },
81
- {
82
- description: "Construction company hero with bold presence",
83
- type: "hero",
84
- props: {
85
- preset: "prominent-primary",
86
- content: "Building Tomorrow Today",
87
- tagline: "Quality construction services for residential and commercial projects",
88
- padding: "p-16",
89
- },
90
- },
91
- {
92
- description: "Fashion brand hero with modern appeal",
93
- type: "hero",
94
- props: {
95
- preset: "prominent-accent",
96
- content: "Express Your Style",
97
- tagline: "Contemporary fashion that speaks to your individuality",
98
- align: {
99
- horizontal: "justify-center",
100
- vertical: "items-start",
101
- },
102
- padding: "p-16",
103
- },
104
- },
105
- {
106
- description: "Law firm hero with authoritative tone",
107
- type: "hero",
108
- props: {
109
- preset: "prominent-secondary",
110
- content: "Justice You Can Trust",
111
- tagline: "Experienced legal representation for individuals and businesses",
112
- padding: "p-8",
113
- border: {
114
- width: "border-2",
115
- color: "border-gray-800",
116
- rounding: "rounded-lg",
117
- },
118
- },
119
- },
120
- {
121
- description: "Photography studio hero with artistic flair",
122
- type: "hero",
123
- props: {
124
- preset: "surface-1",
125
- content: "Capturing Life's Moments",
126
- tagline: "Professional photography services for weddings, portraits, and events",
127
- border: {
128
- rounding: "rounded-lg",
129
- },
130
- },
131
- },
132
- ];
@@ -1,130 +0,0 @@
1
- import { defineBrickManifest } from "~/shared/brick-manifest";
2
- import { defineProps, optional, prop } from "../props/helpers";
3
- import { PiConfetti } from "react-icons/pi";
4
- import { string, urlOrPageId, urlOrPageIdRef } from "../props/string";
5
- import type { BrickProps } from "../props/types";
6
- import type { FC } from "react";
7
- import type { Type } from "@sinclair/typebox";
8
-
9
- export const manifest = defineBrickManifest({
10
- type: "icon",
11
- name: "Icon",
12
- kind: "brick",
13
- description: "An icon with optional text",
14
- repeatable: true,
15
- icon: PiConfetti,
16
- props: defineProps({
17
- icon: prop({
18
- title: "Icon",
19
- description: "Icon to display (iconify reference)",
20
- schema: string("Icon", undefined, {
21
- description: "Icon to display (iconify reference)",
22
- "ui:field": "iconify",
23
- }),
24
- }),
25
- size: prop({
26
- title: "Size",
27
- description: "Size of the icon",
28
- schema: string("Size", "1em", {
29
- description: "Size of the icon",
30
- "ai:instructions": "The size of the icon can be set using 'em' or '%' unit.",
31
- }),
32
- }),
33
- link: optional(urlOrPageIdRef({ title: "Link" })),
34
- }),
35
- });
36
-
37
- export type Manifest = typeof manifest;
38
-
39
- export const examples: {
40
- description: string;
41
- type: string;
42
- props: BrickProps<Manifest>["brick"]["props"];
43
- }[] = [
44
- {
45
- description: "Large heart icon",
46
- type: "icon",
47
- props: {
48
- icon: "mdi:heart",
49
- size: "2em",
50
- },
51
- },
52
- {
53
- description: "Shopping cart icon",
54
- type: "icon",
55
- props: {
56
- icon: "mdi:cart",
57
- size: "1.2em",
58
- },
59
- },
60
- {
61
- description: "Email/message icon",
62
- type: "icon",
63
- props: {
64
- icon: "mdi:email",
65
- size: "1.1em",
66
- link: "mailto:john.doe@example.com",
67
- },
68
- },
69
- {
70
- description: "Phone contact icon",
71
- type: "icon",
72
- props: {
73
- icon: "mdi:phone",
74
- size: "1em",
75
- link: "tel:+1234567890",
76
- },
77
- },
78
- {
79
- description: "Large download icon",
80
- type: "icon",
81
- props: {
82
- icon: "mdi:download",
83
- size: "2.5em",
84
- link: "https://example.com/file.zip",
85
- },
86
- },
87
- {
88
- description: "Menu hamburger icon",
89
- type: "icon",
90
- props: {
91
- icon: "mdi:menu",
92
- size: "1.4em",
93
- },
94
- },
95
- {
96
- description: "Close/X icon",
97
- type: "icon",
98
- props: {
99
- icon: "mdi:close",
100
- size: "1.2em",
101
- },
102
- },
103
- {
104
- description: "Social media Facebook icon",
105
- type: "icon",
106
- props: {
107
- icon: "mdi:facebook",
108
- size: "1.4em",
109
- link: "https://www.facebook.com/yourprofile",
110
- },
111
- },
112
- {
113
- description: "Social media Twitter icon",
114
- type: "icon",
115
- props: {
116
- icon: "mdi:twitter",
117
- size: "1.4em",
118
- link: "https://twitter.com/yourprofile",
119
- },
120
- },
121
- {
122
- description: "Social media Instagram icon",
123
- type: "icon",
124
- props: {
125
- icon: "mdi:instagram",
126
- size: "1.4em",
127
- link: "https://www.instagram.com/yourprofile",
128
- },
129
- },
130
- ];
@@ -1,203 +0,0 @@
1
- import { defineBrickManifest } from "~/shared/brick-manifest";
2
- import { defineProps, optional } from "../props/helpers";
3
- import { imageRef } from "../props/image";
4
- import { backgroundColorRef } from "../props/background";
5
- import { borderRef } from "../props/border";
6
- import { shadowRef } from "../props/effects";
7
- import { paddingRef } from "../props/padding";
8
- import { RxImage } from "react-icons/rx";
9
- import { string } from "../props/string";
10
- import { Type } from "@sinclair/typebox";
11
- import type { BrickProps } from "../props/types";
12
-
13
- export const manifest = defineBrickManifest({
14
- type: "image",
15
- kind: "brick",
16
- name: "Image",
17
- description: "An image brick",
18
- repeatable: true,
19
- defaultHeight: { desktop: 8, mobile: 8 },
20
- defaultWidth: { desktop: 3, mobile: 3 },
21
- icon: RxImage,
22
- props: defineProps({
23
- image: imageRef(),
24
- backgroundColor: optional(backgroundColorRef()),
25
- border: optional(borderRef),
26
- padding: optional(paddingRef),
27
- shadow: optional(shadowRef()),
28
- blurHash: optional(
29
- string("Blur Hash", undefined, {
30
- "ui:fied": "hidden",
31
- description: "A placeholder for the image while it is loading. Use a blur hash string.",
32
- }),
33
- ),
34
- author: optional(
35
- Type.Object({
36
- name: string("Image Author", undefined, {
37
- "ui:field": "hidden",
38
- description: "Image author. Use this to give credit to the author",
39
- }),
40
- url: string("Image Author URL", undefined, {
41
- "ui:field": "hidden",
42
- description: "Image author URL. Use this to give credit to the author",
43
- }),
44
- }),
45
- ),
46
- provider: optional(
47
- string("Image Provider", undefined, {
48
- "ui:field": "hidden",
49
- description: "Image provider. Use this to give credit to the author",
50
- "ai:instructions": "The provider of the image, e.g. 'unsplash', 'pexels', etc.",
51
- }),
52
- ),
53
- }),
54
- });
55
-
56
- export type Manifest = typeof manifest;
57
-
58
- export const examples: {
59
- description: string;
60
- type: string;
61
- props: BrickProps<Manifest>["brick"]["props"];
62
- }[] = [
63
- {
64
- description: "Hero landscape image with shadow",
65
- type: "image",
66
- props: {
67
- image: {
68
- src: "https://via.placeholder.com/800x400.png?text=Hero+Landscape",
69
- alt: "Beautiful landscape view for hero section",
70
- },
71
- shadow: "shadow-lg",
72
- },
73
- },
74
- {
75
- description: "Team member profile photo",
76
- type: "image",
77
- props: {
78
- image: {
79
- src: "https://via.placeholder.com/300x300.png?text=Profile+Photo",
80
- alt: "Team member profile photo",
81
- },
82
- shadow: "shadow-md",
83
- border: {
84
- rounding: "rounded-full",
85
- },
86
- },
87
- },
88
- {
89
- description: "Product showcase image",
90
- type: "image",
91
- props: {
92
- image: {
93
- src: "https://via.placeholder.com/400x400.png?text=Product+Image",
94
- alt: "Premium product showcase",
95
- },
96
- shadow: "shadow-sm",
97
- },
98
- },
99
- {
100
- description: "Blog article featured image",
101
- type: "image",
102
- props: {
103
- image: {
104
- src: "https://via.placeholder.com/600x300.png?text=Article+Featured",
105
- alt: "Featured image for blog article",
106
- },
107
- author: {
108
- name: "John Photographer",
109
- url: "https://example.com/john",
110
- },
111
- provider: "unsplash",
112
- },
113
- },
114
- {
115
- description: "Gallery thumbnail with hover effect",
116
- type: "image",
117
- props: {
118
- image: {
119
- src: "https://via.placeholder.com/250x250.png?text=Gallery+Thumb",
120
- alt: "Gallery thumbnail image",
121
- },
122
-
123
- shadow: "shadow-md",
124
- },
125
- },
126
- {
127
- description: "Logo image with padding",
128
- type: "image",
129
- props: {
130
- image: {
131
- src: "https://via.placeholder.com/200x80.png?text=Company+Logo",
132
- alt: "Company logo",
133
- },
134
- padding: "p-8",
135
- },
136
- },
137
- {
138
- description: "Testimonial customer photo",
139
- type: "image",
140
- props: {
141
- image: {
142
- src: "https://via.placeholder.com/120x120.png?text=Customer",
143
- alt: "Happy customer testimonial photo",
144
- },
145
- border: {
146
- rounding: "rounded-xl",
147
- },
148
- shadow: "shadow-lg",
149
- padding: "p-2",
150
- backgroundColor: "#ffffff",
151
- },
152
- },
153
- {
154
- description: "Event banner image",
155
- type: "image",
156
- props: {
157
- image: {
158
- src: "https://via.placeholder.com/800x200.png?text=Event+Banner",
159
- alt: "Annual conference event banner",
160
- },
161
- border: {
162
- rounding: "rounded-lg",
163
- },
164
- shadow: "shadow-xl",
165
- author: {
166
- name: "Event Photographer",
167
- url: "https://example.com/photographer",
168
- },
169
- provider: "pexels",
170
- },
171
- },
172
- {
173
- description: "Illustration with background",
174
- type: "image",
175
- props: {
176
- image: {
177
- src: "https://via.placeholder.com/150x150.png?text=Blabla+Feature",
178
- alt: "Feature illustration",
179
- },
180
- backgroundColor: "#f0f9ff",
181
- padding: "p-8",
182
- border: {
183
- rounding: "rounded-lg",
184
- },
185
- shadow: "shadow-sm",
186
- },
187
- },
188
- {
189
- description: "Image with blurHash",
190
- type: "image",
191
- props: {
192
- image: {
193
- src: "https://via.placeholder.com/300x200.png?text=Card+Image",
194
- alt: "My image",
195
- },
196
- border: {
197
- rounding: "rounded-lg",
198
- },
199
- shadow: "shadow-md",
200
- blurHash: "L6PZfSi_.AyE_3t7t7R**0o#DgR4",
201
- },
202
- },
203
- ];
@@ -1,227 +0,0 @@
1
- import { Type } from "@sinclair/typebox";
2
- import { defineBrickManifest } from "~/shared/brick-manifest";
3
- import { canvasDataURI } from "~/shared/utils/canvas-data-uri";
4
- import { datasourceRef } from "../props/datasource";
5
- import { defineProps, group, optional, prop } from "../props/helpers";
6
- import { containerLayout, containerLayoutRef, makeContainerProps } from "../props/container";
7
- import { IoGridOutline } from "react-icons/io5";
8
- import type { BrickProps } from "../props/types";
9
- import { string, url } from "../props/string";
10
- import type { FC } from "react";
11
-
12
- export const datasource = Type.Array(
13
- Type.Object({
14
- src: Type.String({ format: "uri", title: "Image URL" }),
15
- alt: Type.String({ default: "", title: "Alt text" }),
16
- }),
17
- {
18
- default: [
19
- {
20
- src: canvasDataURI,
21
- alt: "my image",
22
- },
23
- { src: canvasDataURI, alt: "my image" },
24
- { src: canvasDataURI, alt: "my image" },
25
- { src: canvasDataURI, alt: "my image" },
26
- { src: canvasDataURI, alt: "my image" },
27
- { src: canvasDataURI, alt: "my image" },
28
- ],
29
- },
30
- );
31
-
32
- export type Datasource = typeof datasource;
33
-
34
- export const manifest = defineBrickManifest({
35
- type: "images-gallery",
36
- kind: "widget",
37
- name: "Gallery",
38
- description: "An image collection",
39
- aiInstructions: "This brick should mostly be used for image galleries and collections.",
40
- defaultInspectorTab: "content",
41
- isContainer: false,
42
- minWidth: {
43
- mobile: 10,
44
- desktop: 10,
45
- },
46
- minHeight: {
47
- mobile: 10,
48
- desktop: 10,
49
- },
50
- icon: IoGridOutline,
51
- props: defineProps({
52
- datasource: optional(datasourceRef()),
53
- staticImages: optional(
54
- prop({
55
- title: "Nav items",
56
- schema: Type.Array(Type.Object({ src: url("Image URL"), legend: string("Legend") }), {
57
- title: "Images",
58
- default: [],
59
- }),
60
- }),
61
- ),
62
- styles: group({
63
- title: "Styles",
64
- children: {
65
- layout: containerLayoutRef(),
66
- },
67
- }),
68
- }),
69
- datasource,
70
- });
71
-
72
- export type Manifest = typeof manifest;
73
-
74
- export const examples: {
75
- description: string;
76
- type: string;
77
- props: BrickProps<Manifest>["brick"]["props"];
78
- }[] = [
79
- {
80
- description: "Product portfolio gallery (3-column grid)",
81
- type: "images-gallery",
82
- props: {
83
- styles: {
84
- layout: {
85
- type: "grid",
86
- columns: 3,
87
- gap: "gap-4",
88
- },
89
- },
90
- staticImages: [
91
- {
92
- src: "https://via.placeholder.com/400x400.png?text=Product+1",
93
- legend: "Premium wireless headphones",
94
- },
95
- {
96
- src: "https://via.placeholder.com/400x400.png?text=Product+2",
97
- legend: "Bluetooth speaker",
98
- },
99
- {
100
- src: "https://via.placeholder.com/400x400.png?text=Product+3",
101
- legend: "Smart fitness tracker",
102
- },
103
- {
104
- src: "https://via.placeholder.com/400x400.png?text=Product+4",
105
- legend: "Wireless charging pad",
106
- },
107
- ],
108
- },
109
- },
110
- {
111
- description: "Team photos gallery (4-column grid)",
112
- type: "images-gallery",
113
- props: {
114
- styles: {
115
- layout: {
116
- type: "grid",
117
- gap: "gap-8",
118
- },
119
- },
120
- staticImages: [
121
- {
122
- src: "https://via.placeholder.com/300x300.png?text=CEO",
123
- legend: "Sarah Johnson - Chief Executive Officer",
124
- },
125
- {
126
- src: "https://via.placeholder.com/300x300.png?text=CTO",
127
- legend: "Mike Chen - Chief Technology Officer",
128
- },
129
- {
130
- src: "https://via.placeholder.com/300x300.png?text=Design",
131
- legend: "Emily Rodriguez - Head of Design",
132
- },
133
- {
134
- src: "https://via.placeholder.com/300x300.png?text=Marketing",
135
- legend: "David Park - Marketing Director",
136
- },
137
- {
138
- src: "https://via.placeholder.com/300x300.png?text=Sales",
139
- legend: "Lisa Wong - Sales Manager",
140
- },
141
- {
142
- src: "https://via.placeholder.com/300x300.png?text=Support",
143
- legend: "Alex Thompson - Customer Support Lead",
144
- },
145
- {
146
- src: "https://via.placeholder.com/300x300.png?text=Dev",
147
- legend: "Carlos Martinez - Senior Developer",
148
- },
149
- {
150
- src: "https://via.placeholder.com/300x300.png?text=HR",
151
- legend: "Jennifer Adams - HR Specialist",
152
- },
153
- ],
154
- },
155
- },
156
- {
157
- description: "Project showcase (2-column grid with larger spacing)",
158
- type: "images-gallery",
159
- props: {
160
- styles: {
161
- layout: {
162
- type: "grid",
163
- columns: 2,
164
- gap: "gap-8",
165
- },
166
- },
167
- staticImages: [
168
- {
169
- src: "https://via.placeholder.com/600x400.png?text=Website+Redesign",
170
- legend: "Modern e-commerce website redesign project",
171
- },
172
- {
173
- src: "https://via.placeholder.com/600x400.png?text=Mobile+App",
174
- legend: "iOS and Android mobile application",
175
- },
176
- {
177
- src: "https://via.placeholder.com/600x400.png?text=Brand+Identity",
178
- legend: "Complete brand identity design package",
179
- },
180
- {
181
- src: "https://via.placeholder.com/600x400.png?text=Dashboard+UI",
182
- legend: "Analytics dashboard user interface",
183
- },
184
- ],
185
- },
186
- },
187
- {
188
- description: "Event photos (horizontal flex layout)",
189
- type: "images-gallery",
190
- props: {
191
- styles: {
192
- layout: {
193
- type: "flex",
194
- direction: "flex-row",
195
- wrap: true,
196
- gap: "gap-4",
197
- },
198
- },
199
- staticImages: [
200
- {
201
- src: "https://via.placeholder.com/250x180.png?text=Opening",
202
- legend: "Conference opening ceremony",
203
- },
204
- {
205
- src: "https://via.placeholder.com/250x180.png?text=Keynote",
206
- legend: "Keynote presentation",
207
- },
208
- {
209
- src: "https://via.placeholder.com/250x180.png?text=Workshop",
210
- legend: "Technical workshop session",
211
- },
212
- {
213
- src: "https://via.placeholder.com/250x180.png?text=Networking",
214
- legend: "Networking lunch break",
215
- },
216
- {
217
- src: "https://via.placeholder.com/250x180.png?text=Panel",
218
- legend: "Expert panel discussion",
219
- },
220
- {
221
- src: "https://via.placeholder.com/250x180.png?text=Awards",
222
- legend: "Awards ceremony",
223
- },
224
- ],
225
- },
226
- },
227
- ];