@upstart.gg/sdk 0.0.104 → 0.0.105

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 (225) hide show
  1. package/dist/shared/ajv.js +1 -1
  2. package/dist/shared/attributes.js +1 -1
  3. package/dist/shared/bricks/manifests/accordion.manifest.js +1 -1
  4. package/dist/shared/bricks/manifests/all-manifests.js +1 -1
  5. package/dist/shared/bricks/manifests/button.manifest.js +1 -1
  6. package/dist/shared/bricks/manifests/card.manifest.js +1 -1
  7. package/dist/shared/bricks/manifests/carousel.manifest.js +1 -1
  8. package/dist/shared/bricks/manifests/container.manifest.js +1 -1
  9. package/dist/shared/bricks/manifests/divider.manifest.js +1 -1
  10. package/dist/shared/bricks/manifests/footer.manifest.js +1 -1
  11. package/dist/shared/bricks/manifests/form.manifest.js +1 -1
  12. package/dist/shared/bricks/manifests/hero.manifest.js +1 -1
  13. package/dist/shared/bricks/manifests/icon.manifest.js +1 -1
  14. package/dist/shared/bricks/manifests/image.manifest.js +1 -1
  15. package/dist/shared/bricks/manifests/images-gallery.manifest.js +1 -1
  16. package/dist/shared/bricks/manifests/map.manifest.js +1 -1
  17. package/dist/shared/bricks/manifests/navbar.manifest.js +1 -1
  18. package/dist/shared/bricks/manifests/sidebar.manifest.js +1 -1
  19. package/dist/shared/bricks/manifests/social-links.manifest.js +1 -1
  20. package/dist/shared/bricks/manifests/testimonials.manifest.js +1 -1
  21. package/dist/shared/bricks/manifests/text.manifest.js +1 -1
  22. package/dist/shared/bricks/manifests/timeline.manifest.js +1 -1
  23. package/dist/shared/bricks/manifests/video.manifest.js +1 -1
  24. package/dist/shared/bricks.js +1 -1
  25. package/dist/shared/chunk-245ZLDVB.js +3 -0
  26. package/dist/shared/{chunk-QALNFBY7.js → chunk-2D6ZEIDX.js} +1 -1
  27. package/dist/shared/{chunk-CW5FWW5W.js → chunk-4BLCQRF5.js} +1 -1
  28. package/dist/shared/{chunk-TEPFFY32.js → chunk-5MGYT6FI.js} +1 -1
  29. package/dist/shared/{chunk-HQQYIKTE.js → chunk-CS5N4UQU.js} +1 -1
  30. package/dist/shared/{chunk-5IEGQ7YT.js → chunk-FRWB3BF3.js} +1 -1
  31. package/dist/shared/{chunk-I5S2MPPR.js → chunk-HYXCHFS5.js} +1 -1
  32. package/dist/shared/{chunk-TCZBR3ZU.js → chunk-IKSRCRZZ.js} +1 -1
  33. package/dist/shared/{chunk-LJQXN32B.js → chunk-ISF6EBPX.js} +1 -1
  34. package/dist/shared/{chunk-UK6H3FDX.js → chunk-JDBVMPSI.js} +1 -1
  35. package/dist/shared/{chunk-UISES3HA.js → chunk-M3Z3XDUC.js} +1 -1
  36. package/dist/shared/{chunk-22KRCQK5.js → chunk-MWP5IU33.js} +1 -1
  37. package/dist/shared/{chunk-7L3UOEMR.js → chunk-NCSLTHKN.js} +1 -1
  38. package/dist/shared/{chunk-O22VV7YR.js → chunk-OWON727Q.js} +1 -1
  39. package/dist/shared/{chunk-CEXHD4BO.js → chunk-P5RC56CL.js} +2 -2
  40. package/dist/shared/{chunk-ZFTWLZ3G.js → chunk-QI3BZDXL.js} +1 -1
  41. package/dist/shared/{chunk-F6MLW6DO.js → chunk-RDSK2G6V.js} +1 -1
  42. package/dist/shared/{chunk-I43NIQ2K.js → chunk-RXRPFXDF.js} +1 -1
  43. package/dist/shared/{chunk-POYVTV5F.js → chunk-VFGMOA4M.js} +1 -1
  44. package/dist/shared/{chunk-VDHLON5R.js → chunk-VPD626ML.js} +1 -1
  45. package/dist/shared/{chunk-WCNVFVDK.js → chunk-VROOAFFW.js} +1 -1
  46. package/dist/shared/{chunk-E2EBTWJI.js → chunk-WB4PGCZQ.js} +1 -1
  47. package/dist/shared/chunk-X2RJL33B.js +3 -0
  48. package/dist/shared/{chunk-OQIFFJ7I.js → chunk-X4ZBUWUL.js} +1 -1
  49. package/dist/shared/datasources/external/rss/fetcher.d.ts +1 -1
  50. package/dist/shared/datasources/external/rss/fetcher.d.ts.map +1 -1
  51. package/dist/shared/page.js +1 -1
  52. package/dist/shared/site.js +1 -1
  53. package/package.json +5 -9
  54. package/dist/shared/chunk-GPKRRX3D.js +0 -3
  55. package/dist/shared/chunk-JFDOR3UH.js +0 -3
  56. package/src/node/cli/api.ts +0 -101
  57. package/src/node/cli/commands/cmd-build.ts +0 -64
  58. package/src/node/cli/commands/login/cmd-login.ts +0 -111
  59. package/src/node/cli/commands/logout/cmd-logout.ts +0 -11
  60. package/src/node/cli/commands/publish/cmd-publish.ts +0 -135
  61. package/src/node/cli/commands/publish/parse-gitignore.ts +0 -278
  62. package/src/node/cli/commands/publish/uploader.ts +0 -333
  63. package/src/node/cli/constants.ts +0 -14
  64. package/src/node/cli/is-logged-in.ts +0 -28
  65. package/src/node/cli/program.ts +0 -77
  66. package/src/node/cli/store.ts +0 -64
  67. package/src/node/cli/tests/api.test.ts +0 -161
  68. package/src/node/cli/types.ts +0 -34
  69. package/src/node/cli/utils.ts +0 -20
  70. package/src/node/shared/config.ts +0 -69
  71. package/src/node/shared/logger.ts +0 -44
  72. package/src/shared/ajv.ts +0 -103
  73. package/src/shared/analytics/init.ts +0 -14
  74. package/src/shared/analytics/track.ts +0 -21
  75. package/src/shared/analytics/types.ts +0 -13
  76. package/src/shared/attributes.ts +0 -211
  77. package/src/shared/brick-manifest.ts +0 -110
  78. package/src/shared/bricks/manifests/accordion.manifest.ts +0 -179
  79. package/src/shared/bricks/manifests/all-manifests.ts +0 -92
  80. package/src/shared/bricks/manifests/button.manifest.ts +0 -145
  81. package/src/shared/bricks/manifests/card.manifest.ts +0 -269
  82. package/src/shared/bricks/manifests/carousel.manifest.ts +0 -106
  83. package/src/shared/bricks/manifests/container.manifest.ts +0 -357
  84. package/src/shared/bricks/manifests/divider.manifest.ts +0 -121
  85. package/src/shared/bricks/manifests/footer.manifest.ts +0 -487
  86. package/src/shared/bricks/manifests/form.manifest.ts +0 -112
  87. package/src/shared/bricks/manifests/hero.manifest.ts +0 -132
  88. package/src/shared/bricks/manifests/icon.manifest.ts +0 -130
  89. package/src/shared/bricks/manifests/image.manifest.ts +0 -203
  90. package/src/shared/bricks/manifests/images-gallery.manifest.ts +0 -227
  91. package/src/shared/bricks/manifests/map.manifest.ts +0 -75
  92. package/src/shared/bricks/manifests/navbar.manifest.ts +0 -344
  93. package/src/shared/bricks/manifests/sidebar.manifest.ts +0 -90
  94. package/src/shared/bricks/manifests/social-links.manifest.ts +0 -370
  95. package/src/shared/bricks/manifests/testimonials.manifest.ts +0 -397
  96. package/src/shared/bricks/manifests/tests/header.manifest.test.ts +0 -10
  97. package/src/shared/bricks/manifests/text.manifest.ts +0 -164
  98. package/src/shared/bricks/manifests/timeline.manifest.ts +0 -456
  99. package/src/shared/bricks/manifests/video.manifest.ts +0 -59
  100. package/src/shared/bricks/props/_style-presets.ts +0 -352
  101. package/src/shared/bricks/props/align.ts +0 -59
  102. package/src/shared/bricks/props/background.ts +0 -118
  103. package/src/shared/bricks/props/boolean.ts +0 -11
  104. package/src/shared/bricks/props/border.ts +0 -84
  105. package/src/shared/bricks/props/color.ts +0 -24
  106. package/src/shared/bricks/props/common.ts +0 -37
  107. package/src/shared/bricks/props/container.ts +0 -356
  108. package/src/shared/bricks/props/css-length.ts +0 -25
  109. package/src/shared/bricks/props/datasource.ts +0 -60
  110. package/src/shared/bricks/props/date.ts +0 -24
  111. package/src/shared/bricks/props/effects.ts +0 -123
  112. package/src/shared/bricks/props/enum.ts +0 -42
  113. package/src/shared/bricks/props/file.ts +0 -12
  114. package/src/shared/bricks/props/geolocation.ts +0 -30
  115. package/src/shared/bricks/props/helpers.ts +0 -101
  116. package/src/shared/bricks/props/image.ts +0 -90
  117. package/src/shared/bricks/props/number.ts +0 -16
  118. package/src/shared/bricks/props/padding.ts +0 -21
  119. package/src/shared/bricks/props/position.ts +0 -27
  120. package/src/shared/bricks/props/preset.ts +0 -136
  121. package/src/shared/bricks/props/string.ts +0 -56
  122. package/src/shared/bricks/props/tests/align.test.ts +0 -37
  123. package/src/shared/bricks/props/tests/background.test.ts +0 -102
  124. package/src/shared/bricks/props/tests/border.test.ts +0 -38
  125. package/src/shared/bricks/props/tests/effects.test.ts +0 -37
  126. package/src/shared/bricks/props/tests/helpers.test.ts +0 -133
  127. package/src/shared/bricks/props/tests/image.test.ts +0 -71
  128. package/src/shared/bricks/props/tests/padding.ts +0 -12
  129. package/src/shared/bricks/props/tests/string.test.ts +0 -79
  130. package/src/shared/bricks/props/text.ts +0 -66
  131. package/src/shared/bricks/props/types.ts +0 -57
  132. package/src/shared/bricks.ts +0 -232
  133. package/src/shared/context.ts +0 -39
  134. package/src/shared/datarecords/external/airtable/handler.ts +0 -21
  135. package/src/shared/datarecords/external/airtable/options.ts +0 -22
  136. package/src/shared/datarecords/external/generic-webhook/handler.ts +0 -10
  137. package/src/shared/datarecords/external/generic-webhook/options.ts +0 -13
  138. package/src/shared/datarecords/external/google/oauth/config.ts +0 -30
  139. package/src/shared/datarecords/external/google/sheets/handler.ts +0 -26
  140. package/src/shared/datarecords/external/google/sheets/options.ts +0 -9
  141. package/src/shared/datarecords/types.ts +0 -120
  142. package/src/shared/datarecords.ts +0 -5
  143. package/src/shared/datasources/README.md +0 -3
  144. package/src/shared/datasources/external/facebook/posts/fetcher.ts +0 -52
  145. package/src/shared/datasources/external/facebook/posts/sample.ts +0 -35
  146. package/src/shared/datasources/external/facebook/posts/schema.ts +0 -33
  147. package/src/shared/datasources/external/facebook/posts/tests/fetcher.test.ts +0 -73
  148. package/src/shared/datasources/external/http-json/fetcher.ts +0 -28
  149. package/src/shared/datasources/external/http-json/options.ts +0 -12
  150. package/src/shared/datasources/external/http-json/schema.ts +0 -6
  151. package/src/shared/datasources/external/http-json/tests/fetcher.test.ts +0 -70
  152. package/src/shared/datasources/external/instagram/feed/fetcher.ts +0 -33
  153. package/src/shared/datasources/external/instagram/feed/sample.ts +0 -22
  154. package/src/shared/datasources/external/instagram/feed/schema.ts +0 -23
  155. package/src/shared/datasources/external/instagram/feed/tests/fetcher.test.ts +0 -64
  156. package/src/shared/datasources/external/mastodon/account/fetcher.ts +0 -24
  157. package/src/shared/datasources/external/mastodon/account/sample.ts +0 -33
  158. package/src/shared/datasources/external/mastodon/account/schema.ts +0 -45
  159. package/src/shared/datasources/external/mastodon/account/tests/fetcher.test.ts +0 -47
  160. package/src/shared/datasources/external/mastodon/options.ts +0 -11
  161. package/src/shared/datasources/external/mastodon/status/fetcher.ts +0 -35
  162. package/src/shared/datasources/external/mastodon/status/sample.array.ts +0 -59
  163. package/src/shared/datasources/external/mastodon/status/sample.single.ts +0 -55
  164. package/src/shared/datasources/external/mastodon/status/schema.ts +0 -130
  165. package/src/shared/datasources/external/mastodon/status/tests/fetcher.test.ts +0 -74
  166. package/src/shared/datasources/external/meta/oauth/config.ts +0 -16
  167. package/src/shared/datasources/external/meta/options.ts +0 -11
  168. package/src/shared/datasources/external/rss/fetcher.ts +0 -29
  169. package/src/shared/datasources/external/rss/options.ts +0 -11
  170. package/src/shared/datasources/external/rss/sample.ts +0 -22
  171. package/src/shared/datasources/external/rss/schema.ts +0 -42
  172. package/src/shared/datasources/external/threads/media/fetcher.ts +0 -53
  173. package/src/shared/datasources/external/threads/media/sample.ts +0 -44
  174. package/src/shared/datasources/external/threads/media/schema.ts +0 -37
  175. package/src/shared/datasources/external/tiktok/oauth/config.ts +0 -17
  176. package/src/shared/datasources/external/tiktok/video/fetcher.ts +0 -39
  177. package/src/shared/datasources/external/tiktok/video/options.ts +0 -12
  178. package/src/shared/datasources/external/tiktok/video/sample.ts +0 -26
  179. package/src/shared/datasources/external/tiktok/video/schema.ts +0 -27
  180. package/src/shared/datasources/external/youtube/list/fetcher.ts +0 -37
  181. package/src/shared/datasources/external/youtube/list/options.ts +0 -15
  182. package/src/shared/datasources/external/youtube/list/sample.ts +0 -33
  183. package/src/shared/datasources/external/youtube/list/schema.ts +0 -38
  184. package/src/shared/datasources/external/youtube/oauth/config.ts +0 -15
  185. package/src/shared/datasources/fetcher.ts +0 -17
  186. package/src/shared/datasources/internal/blog/schema.ts +0 -69
  187. package/src/shared/datasources/internal/changelog/schema.ts +0 -48
  188. package/src/shared/datasources/internal/contact-info/schema.ts +0 -20
  189. package/src/shared/datasources/internal/cv/schema.ts +0 -217
  190. package/src/shared/datasources/internal/faq/schema.ts +0 -27
  191. package/src/shared/datasources/internal/job-board/schema.ts +0 -228
  192. package/src/shared/datasources/internal/links/schema.ts +0 -15
  193. package/src/shared/datasources/internal/recipes/schema.ts +0 -42
  194. package/src/shared/datasources/internal/restaurant/schema.ts +0 -225
  195. package/src/shared/datasources/provider-options.ts +0 -7
  196. package/src/shared/datasources/samples.ts +0 -26
  197. package/src/shared/datasources/schemas.ts +0 -45
  198. package/src/shared/datasources/types.ts +0 -276
  199. package/src/shared/datasources/utils.ts +0 -16
  200. package/src/shared/datasources.ts +0 -42
  201. package/src/shared/env.ts +0 -23
  202. package/src/shared/errors.ts +0 -1
  203. package/src/shared/images.ts +0 -44
  204. package/src/shared/index.ts +0 -3
  205. package/src/shared/layout-constants.ts +0 -25
  206. package/src/shared/manifest.ts +0 -50
  207. package/src/shared/oauth.ts +0 -16
  208. package/src/shared/page.ts +0 -61
  209. package/src/shared/prompt.ts +0 -9
  210. package/src/shared/responsive.ts +0 -5
  211. package/src/shared/site.ts +0 -97
  212. package/src/shared/sitemap.ts +0 -66
  213. package/src/shared/social-icons.ts +0 -307
  214. package/src/shared/tests/attributes.test.ts +0 -37
  215. package/src/shared/theme.ts +0 -245
  216. package/src/shared/themes/README.md +0 -34
  217. package/src/shared/themes/color-system.ts +0 -127
  218. package/src/shared/utils/canvas-data-uri.ts +0 -2
  219. package/src/shared/utils/invariant.ts +0 -25
  220. package/src/shared/utils/json-date.ts +0 -8
  221. package/src/shared/utils/merge.ts +0 -12
  222. package/src/shared/utils/object-hash.ts +0 -7
  223. package/src/shared/utils/schema.ts +0 -35
  224. package/src/shared/utils/try-catch.ts +0 -12
  225. package/src/shared/utils/typed-ref.ts +0 -41
@@ -1,75 +0,0 @@
1
- import { defineBrickManifest } from "~/shared/brick-manifest";
2
- import { defineProps, optional, prop } from "../props/helpers";
3
- import { LiaMapMarkedAltSolid } from "react-icons/lia";
4
- import { Type } from "@sinclair/typebox";
5
- import { string } from "../props/string";
6
- import { number } from "../props/number";
7
- import { backgroundColor, backgroundColorRef } from "../props/background";
8
- import { border, borderRef } from "../props/border";
9
- import { padding, paddingRef } from "../props/padding";
10
- import { shadow, shadowRef } from "../props/effects";
11
- import type { BrickProps } from "../props/types";
12
- import type { FC } from "react";
13
-
14
- export const manifest = defineBrickManifest({
15
- type: "map",
16
- kind: "widget",
17
- name: "Map",
18
- description: "A map element showing a location",
19
- aiInstructions:
20
- "This brick can be used to show a location on a map. Use the 'location' prop to set the coordinates and an optional tooltip.",
21
- icon: LiaMapMarkedAltSolid,
22
- props: defineProps({
23
- location: prop({
24
- title: "Location",
25
- description: "The location to display on the map",
26
- schema: Type.Object({
27
- lat: number("Latitude"),
28
- lng: number("Longitude"),
29
- tooltip: optional(string("Tooltip")),
30
- }),
31
- }),
32
- backgroundColor: optional(backgroundColorRef()),
33
- border: optional(borderRef),
34
- padding: optional(paddingRef),
35
- shadow: optional(shadowRef()),
36
- }),
37
- });
38
-
39
- export type Manifest = typeof manifest;
40
-
41
- export const examples: {
42
- description: string;
43
- type: string;
44
- props: BrickProps<Manifest>["brick"]["props"];
45
- }[] = [
46
- {
47
- description: "Map showing a specific location",
48
- type: "map",
49
- props: {
50
- location: {
51
- lat: 37.7749,
52
- lng: -122.4194,
53
- tooltip: "San Francisco, CA",
54
- },
55
- },
56
- },
57
- {
58
- description: "Map with custom styles",
59
- type: "map",
60
- props: {
61
- location: {
62
- lat: 40.7128,
63
- lng: -74.006,
64
- tooltip: "New York, NY",
65
- },
66
- backgroundColor: "bg-gray-100",
67
- border: {
68
- color: "border-gray-300",
69
- width: "border",
70
- },
71
- padding: "p-16",
72
- shadow: "shadow-lg",
73
- },
74
- },
75
- ];
@@ -1,344 +0,0 @@
1
- import { Type } from "@sinclair/typebox";
2
- import { defineBrickManifest } from "~/shared/brick-manifest";
3
- import { defineProps, group, optional, prop } from "../props/helpers";
4
- import { border, borderRef } from "../props/border";
5
- import { string, urlOrPageId, urlOrPageIdRef } from "../props/string";
6
- import { image, imageRef } from "../props/image";
7
- import { backgroundColor, backgroundColorRef } from "../props/background";
8
- import { textContent, textContentRef } from "../props/text";
9
- import { shadow, shadowRef } from "../props/effects";
10
- import { datasourceRef } from "../props/datasource";
11
- import { fixedPositioned } from "../props/position";
12
- import { boolean } from "../props/boolean";
13
- import { VscLayoutPanelOff } from "react-icons/vsc";
14
- import type { BrickProps } from "../props/types";
15
- import { colorRef } from "../props/color";
16
- import type { FC } from "react";
17
-
18
- export const datasource = Type.Array(
19
- Type.Object({
20
- href: urlOrPageIdRef(),
21
- label: Type.String(),
22
- }),
23
- {
24
- default: [
25
- {
26
- href: "#",
27
- label: "Link 1",
28
- },
29
- {
30
- href: "#",
31
- label: "Link 2",
32
- },
33
- {
34
- href: "#",
35
- label: "Link 3",
36
- },
37
- ],
38
- },
39
- );
40
-
41
- export const manifest = defineBrickManifest({
42
- type: "navbar",
43
- kind: "widget",
44
- name: "Navbar",
45
- description: "A navigation bar with logo and navigation",
46
- aiInstructions: "This brick should be used on most sites/pages.",
47
- datasource,
48
- duplicatable: false,
49
- defaultHeight: {
50
- desktop: 3,
51
- mobile: 3,
52
- },
53
- maxHeight: {
54
- desktop: 3,
55
- mobile: 3,
56
- },
57
- minHeight: {
58
- desktop: 3,
59
- mobile: 3,
60
- },
61
- icon: VscLayoutPanelOff,
62
- iconClassName: "rotate-180",
63
- props: defineProps({
64
- container: optional(
65
- group({
66
- title: "Main element",
67
- children: {
68
- backgroundColor: optional(backgroundColorRef()),
69
- border: optional(borderRef),
70
- shadow: optional(shadowRef()),
71
- fixedPositioned: optional(fixedPositioned()),
72
- },
73
- metadata: {
74
- "ui:responsive": true,
75
- },
76
- }),
77
- ),
78
- brand: group({
79
- title: "Brand",
80
- children: {
81
- name: optional(textContentRef({ title: "Brand name", default: "Acme Inc.", disableSizing: true })),
82
- logo: optional(imageRef({ title: "Logo", noObjectOptions: true })),
83
- hideText: optional(boolean("Hide text")),
84
- color: optional(colorRef()),
85
- },
86
- }),
87
- navigation: group({
88
- title: "Links",
89
- children: {
90
- position: prop({
91
- title: "Position",
92
- schema: Type.Union(
93
- [
94
- Type.Literal("left", { title: "Left" }),
95
- Type.Literal("center", { title: "Center" }),
96
- Type.Literal("right", { title: "Right" }),
97
- ],
98
- { default: "right" },
99
- ),
100
- }),
101
- color: optional(colorRef()),
102
- datasource: optional(datasourceRef()),
103
- staticItems: optional(
104
- prop({
105
- title: "Nav items",
106
- schema: Type.Array(
107
- Type.Object({
108
- urlOrPageId: urlOrPageIdRef(),
109
- label: optional(string("Label")),
110
- }),
111
- { title: "Navigation items", default: [] },
112
- ),
113
- }),
114
- ),
115
- },
116
- }),
117
- }),
118
- });
119
-
120
- export type Manifest = typeof manifest;
121
-
122
- export const examples: {
123
- description: string;
124
- type: string;
125
- props: BrickProps<Manifest>["brick"]["props"];
126
- }[] = [
127
- {
128
- description: "Corporate navbar with logo and right-aligned navigation",
129
- type: "navbar",
130
- props: {
131
- preset: "prominent-primary",
132
- container: {},
133
- brand: {
134
- name: "TechCorp Solutions",
135
- logo: {
136
- src: "https://via.placeholder.com/120x40.png?text=TechCorp",
137
- alt: "TechCorp Solutions logo",
138
- },
139
- color: "#1f2937",
140
- },
141
- navigation: {
142
- position: "right",
143
- color: "#374151",
144
- staticItems: [
145
- { urlOrPageId: "/services" },
146
- { urlOrPageId: "/about" },
147
- { urlOrPageId: "/portfolio" },
148
- { urlOrPageId: "/contact" },
149
- ],
150
- },
151
- },
152
- },
153
- {
154
- description: "Dark theme navbar with centered navigation",
155
- type: "navbar",
156
- props: {
157
- container: {
158
- backgroundColor: "#1f2937",
159
- shadow: "shadow-lg",
160
- },
161
- brand: {
162
- name: "Creative Studio",
163
- logo: {
164
- src: "https://via.placeholder.com/100x35.png?text=Studio",
165
- alt: "Creative Studio logo",
166
- },
167
- color: "#ffffff",
168
- },
169
- navigation: {
170
- position: "center",
171
- color: "#d1d5db",
172
- staticItems: [
173
- { urlOrPageId: "/work" },
174
- { urlOrPageId: "/services" },
175
- { urlOrPageId: "/team" },
176
- { urlOrPageId: "/blog" },
177
- ],
178
- },
179
- },
180
- },
181
- {
182
- description: "SaaS platform navbar with fixed positioning",
183
- type: "navbar",
184
- props: {
185
- container: {
186
- backgroundColor: "#3b82f6",
187
- fixedPositioned: true,
188
- shadow: "shadow-md",
189
- },
190
- brand: {
191
- name: "CloudFlow",
192
- logo: {
193
- src: "https://via.placeholder.com/110x38.png?text=CloudFlow",
194
- alt: "CloudFlow platform logo",
195
- },
196
- color: "#ffffff",
197
- },
198
- navigation: {
199
- position: "right",
200
- color: "#f1f5f9",
201
- staticItems: [
202
- { urlOrPageId: "/features" },
203
- { urlOrPageId: "/pricing" },
204
- { urlOrPageId: "/docs" },
205
- { urlOrPageId: "/login" },
206
- ],
207
- },
208
- },
209
- },
210
- {
211
- description: "E-commerce navbar",
212
- type: "navbar",
213
- props: {
214
- preset: "prominent-primary",
215
- brand: {
216
- name: "ShopEasy",
217
- logo: {
218
- src: "https://via.placeholder.com/130x45.png?text=ShopEasy",
219
- alt: "ShopEasy store logo",
220
- },
221
- },
222
- navigation: {
223
- position: "right",
224
- staticItems: [
225
- { urlOrPageId: "/products" },
226
- { urlOrPageId: "/categories" },
227
- { urlOrPageId: "/deals" },
228
- { urlOrPageId: "/account" },
229
- { urlOrPageId: "/cart" },
230
- ],
231
- },
232
- },
233
- },
234
- {
235
- description: "Agency navbar with logo-only brand",
236
- type: "navbar",
237
- props: {
238
- container: {
239
- shadow: "shadow-sm",
240
- },
241
- brand: {
242
- logo: {
243
- src: "https://via.placeholder.com/140x50.png?text=Agency+Logo",
244
- alt: "Digital agency logo",
245
- },
246
- hideText: true,
247
- },
248
- navigation: {
249
- position: "right",
250
- color: "#64748b",
251
- staticItems: [
252
- { urlOrPageId: "/projects" },
253
- { urlOrPageId: "/capabilities" },
254
- { urlOrPageId: "/insights" },
255
- { urlOrPageId: "/contact" },
256
- ],
257
- },
258
- },
259
- },
260
- {
261
- description: "Restaurant navbar with warm styling",
262
- type: "navbar",
263
- props: {
264
- container: {
265
- backgroundColor: "#7c2d12",
266
- shadow: "shadow-lg",
267
- },
268
- brand: {
269
- name: "Bella Vista",
270
- logo: {
271
- src: "https://via.placeholder.com/80x50.png?text=BV",
272
- alt: "Bella Vista restaurant logo",
273
- },
274
- color: "#fed7aa",
275
- },
276
- navigation: {
277
- position: "center",
278
- color: "#fdba74",
279
- staticItems: [
280
- { urlOrPageId: "/menu" },
281
- { urlOrPageId: "/reservations" },
282
- { urlOrPageId: "/events" },
283
- { urlOrPageId: "/location" },
284
- ],
285
- },
286
- },
287
- },
288
- {
289
- description: "Portfolio navbar with left-aligned navigation",
290
- type: "navbar",
291
- props: {
292
- preset: "prominent-secondary",
293
- container: {
294
- backgroundColor: "#f1f5f9",
295
- border: {
296
- sides: ["border-b"],
297
- color: "border-accent",
298
- },
299
- },
300
- brand: {
301
- name: "Alex Martinez",
302
- color: "#334155",
303
- },
304
- navigation: {
305
- position: "left",
306
- color: "#64748b",
307
- staticItems: [
308
- { urlOrPageId: "/work" },
309
- { urlOrPageId: "/about" },
310
- { urlOrPageId: "/experience" },
311
- { urlOrPageId: "/contact" },
312
- ],
313
- },
314
- },
315
- },
316
- {
317
- description: "Non-profit navbar with mission-focused design",
318
- type: "navbar",
319
- props: {
320
- preset: "prominent-primary",
321
- container: {
322
- shadow: "shadow-md",
323
- },
324
- brand: {
325
- name: "Green Future",
326
- logo: {
327
- src: "https://via.placeholder.com/100x40.png?text=GF",
328
- alt: "Green Future organization logo",
329
- },
330
- color: "#d1fae5",
331
- },
332
- navigation: {
333
- position: "right",
334
- color: "#a7f3d0",
335
- staticItems: [
336
- { urlOrPageId: "/mission" },
337
- { urlOrPageId: "/programs" },
338
- { urlOrPageId: "/volunteer" },
339
- { urlOrPageId: "/donate" },
340
- ],
341
- },
342
- },
343
- },
344
- ];
@@ -1,90 +0,0 @@
1
- import { defineBrickManifest } from "~/shared/brick-manifest";
2
- import { defineProps, group, optional, prop } from "../props/helpers";
3
- import { VscLayoutSidebarLeftOff } from "react-icons/vsc";
4
- import { Type } from "@sinclair/typebox";
5
- import { datasourceRef } from "../props/datasource";
6
- import { string, urlOrPageId, urlOrPageIdRef } from "../props/string";
7
- import { backgroundColor, backgroundColorRef } from "../props/background";
8
- import { border, borderRef } from "../props/border";
9
- import { fixedPositioned } from "../props/position";
10
- import { preset } from "../props/preset";
11
- import type { BrickProps } from "../props/types";
12
- import type { FC } from "react";
13
- import { shadowRef } from "../props/effects";
14
-
15
- export const manifest = defineBrickManifest({
16
- type: "sidebar",
17
- kind: "widget",
18
- name: "Sidebar",
19
- description: "A sidebard element",
20
- aiInstructions: `
21
- This brick should be used on most sites/pages for navigation. By deault, it will display links
22
- to the main pages of the site. You can customize the links by using the 'navigation.navItems' prop.
23
- `.trim(),
24
- icon: VscLayoutSidebarLeftOff,
25
- props: defineProps({
26
- container: optional(
27
- group({
28
- title: "Main element",
29
- children: {
30
- backgroundColor: optional(backgroundColorRef()),
31
- border: optional(borderRef),
32
- shadow: optional(shadowRef()),
33
- fixedPositioned: optional(fixedPositioned()),
34
- },
35
- metadata: {
36
- "ui:responsive": true,
37
- },
38
- }),
39
- ),
40
- navigation: optional(
41
- group({
42
- title: "Links",
43
- children: {
44
- datasource: optional(datasourceRef()),
45
- navItems: optional(
46
- prop({
47
- title: "Nav items",
48
- schema: Type.Array(
49
- Type.Object({
50
- urlOrPageId: urlOrPageIdRef(),
51
- label: optional(string("Label")),
52
- }),
53
- { title: "Navigation items", default: [] },
54
- ),
55
- }),
56
- ),
57
- },
58
- }),
59
- ),
60
- }),
61
- });
62
-
63
- export type Manifest = typeof manifest;
64
-
65
- export const examples: {
66
- description: string;
67
- type: string;
68
- props: BrickProps<Manifest>["brick"]["props"];
69
- }[] = [
70
- {
71
- description: "Standard sidebar with navigation links base on site pages",
72
- type: "sidebar",
73
- props: {},
74
- },
75
- {
76
- description: "Sidebar with specified navigation links",
77
- type: "sidebar",
78
- props: {
79
- container: {
80
- backgroundColor: "#f0f0f0",
81
- },
82
- navigation: {
83
- navItems: [
84
- { urlOrPageId: "https://google.com", label: "Google" },
85
- { urlOrPageId: "https://bing.com", label: "Bing" },
86
- ],
87
- },
88
- },
89
- },
90
- ];