@upstart.gg/sdk 0.0.130 → 0.0.132
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.
- package/dist/shared/ai/schemas.d.ts +13 -0
- package/dist/shared/ai/schemas.d.ts.map +1 -0
- package/dist/shared/ai/schemas.js +3 -0
- package/dist/shared/ai/types.d.ts +170 -0
- package/dist/shared/ai/types.d.ts.map +1 -0
- package/dist/shared/{chunk-EJGNYD4V.js → ai/types.js} +0 -1
- package/dist/shared/ajv.d.ts +2 -1
- package/dist/shared/ajv.d.ts.map +1 -1
- package/dist/shared/ajv.js +1 -1
- package/dist/shared/attributes.d.ts +300 -12
- package/dist/shared/attributes.d.ts.map +1 -1
- package/dist/shared/attributes.js +1 -1
- package/dist/shared/brick-manifest.d.ts +3 -1
- package/dist/shared/brick-manifest.d.ts.map +1 -1
- package/dist/shared/brick-manifest.js +1 -1
- package/dist/shared/bricks/manifests/accordion.manifest.d.ts +4 -3
- package/dist/shared/bricks/manifests/accordion.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/accordion.manifest.js +1 -1
- package/dist/shared/bricks/manifests/all-manifests.d.ts +4 -1
- package/dist/shared/bricks/manifests/all-manifests.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/all-manifests.js +1 -1
- package/dist/shared/bricks/manifests/box.manifest.d.ts +6 -4
- package/dist/shared/bricks/manifests/box.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/box.manifest.js +1 -1
- package/dist/shared/bricks/manifests/button.manifest.d.ts +4 -3
- package/dist/shared/bricks/manifests/button.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/button.manifest.js +1 -1
- package/dist/shared/bricks/manifests/card.manifest.d.ts +6 -5
- package/dist/shared/bricks/manifests/card.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/card.manifest.js +1 -1
- package/dist/shared/bricks/manifests/carousel.manifest.d.ts +6 -5
- package/dist/shared/bricks/manifests/carousel.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/carousel.manifest.js +1 -1
- package/dist/shared/bricks/manifests/footer.manifest.d.ts +40 -5
- package/dist/shared/bricks/manifests/footer.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/footer.manifest.js +1 -1
- package/dist/shared/bricks/manifests/form.manifest.d.ts +6 -5
- package/dist/shared/bricks/manifests/form.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/form.manifest.js +1 -1
- package/dist/shared/bricks/manifests/hero.manifest.d.ts +4 -3
- package/dist/shared/bricks/manifests/hero.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/hero.manifest.js +1 -1
- package/dist/shared/bricks/manifests/html.manifest.d.ts +3 -2
- package/dist/shared/bricks/manifests/html.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/html.manifest.js +1 -1
- package/dist/shared/bricks/manifests/icon.manifest.d.ts +3 -2
- package/dist/shared/bricks/manifests/icon.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/icon.manifest.js +1 -1
- package/dist/shared/bricks/manifests/image.manifest.d.ts +10 -6
- package/dist/shared/bricks/manifests/image.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/image.manifest.js +1 -1
- package/dist/shared/bricks/manifests/images-gallery.manifest.d.ts +7 -6
- package/dist/shared/bricks/manifests/images-gallery.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/images-gallery.manifest.js +1 -1
- package/dist/shared/bricks/manifests/map.manifest.d.ts +5 -4
- package/dist/shared/bricks/manifests/map.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/map.manifest.js +1 -1
- package/dist/shared/bricks/manifests/navbar.manifest.d.ts +42 -8
- package/dist/shared/bricks/manifests/navbar.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/navbar.manifest.js +1 -1
- package/dist/shared/bricks/manifests/sidebar.manifest.d.ts +4 -3
- package/dist/shared/bricks/manifests/sidebar.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/sidebar.manifest.js +1 -1
- package/dist/shared/bricks/manifests/social-links.manifest.d.ts +5 -4
- package/dist/shared/bricks/manifests/social-links.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/social-links.manifest.js +1 -1
- package/dist/shared/bricks/manifests/spacer.manifest.d.ts +3 -2
- package/dist/shared/bricks/manifests/spacer.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/spacer.manifest.js +1 -1
- package/dist/shared/bricks/manifests/testimonials.manifest.d.ts +6 -5
- package/dist/shared/bricks/manifests/testimonials.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/testimonials.manifest.js +1 -1
- package/dist/shared/bricks/manifests/text.manifest.d.ts +4 -3
- package/dist/shared/bricks/manifests/text.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/text.manifest.js +1 -1
- package/dist/shared/bricks/manifests/video.manifest.d.ts +4 -3
- package/dist/shared/bricks/manifests/video.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/video.manifest.js +1 -1
- package/dist/shared/bricks/props/align.d.ts.map +1 -1
- package/dist/shared/bricks/props/align.js +1 -1
- package/dist/shared/bricks/props/background.d.ts +6 -9
- package/dist/shared/bricks/props/background.d.ts.map +1 -1
- package/dist/shared/bricks/props/background.js +1 -1
- package/dist/shared/bricks/props/border.d.ts.map +1 -1
- package/dist/shared/bricks/props/border.js +1 -1
- package/dist/shared/bricks/props/color-preset.d.ts +3 -4
- package/dist/shared/bricks/props/color-preset.d.ts.map +1 -1
- package/dist/shared/bricks/props/color-preset.js +1 -1
- package/dist/shared/bricks/props/color.js +1 -1
- package/dist/shared/bricks/props/common.d.ts +6 -6
- package/dist/shared/bricks/props/common.d.ts.map +1 -1
- package/dist/shared/bricks/props/common.js +1 -1
- package/dist/shared/bricks/props/css-length.d.ts.map +1 -1
- package/dist/shared/bricks/props/css-length.js +1 -1
- package/dist/shared/bricks/props/datasource.d.ts +1 -1
- package/dist/shared/bricks/props/datasource.js +1 -1
- package/dist/shared/bricks/props/date.d.ts.map +1 -1
- package/dist/shared/bricks/props/date.js +1 -1
- package/dist/shared/bricks/props/direction.d.ts.map +1 -1
- package/dist/shared/bricks/props/direction.js +1 -1
- package/dist/shared/bricks/props/dynamic.d.ts.map +1 -1
- package/dist/shared/bricks/props/dynamic.js +1 -1
- package/dist/shared/bricks/props/effects.d.ts +0 -1
- package/dist/shared/bricks/props/effects.d.ts.map +1 -1
- package/dist/shared/bricks/props/effects.js +1 -1
- package/dist/shared/bricks/props/file.d.ts.map +1 -1
- package/dist/shared/bricks/props/file.js +1 -1
- package/dist/shared/bricks/props/geolocation.js +1 -1
- package/dist/shared/bricks/props/helpers.d.ts +2 -2
- package/dist/shared/bricks/props/helpers.js +1 -1
- package/dist/shared/bricks/props/image.d.ts +4 -4
- package/dist/shared/bricks/props/image.d.ts.map +1 -1
- package/dist/shared/bricks/props/image.js +1 -1
- package/dist/shared/bricks/props/position.d.ts +0 -2
- package/dist/shared/bricks/props/position.d.ts.map +1 -1
- package/dist/shared/bricks/props/position.js +1 -1
- package/dist/shared/bricks/props/string.js +1 -1
- package/dist/shared/bricks/props/tags.d.ts.map +1 -1
- package/dist/shared/bricks/props/tags.js +1 -1
- package/dist/shared/bricks/props/text.js +1 -1
- package/dist/shared/bricks/props/types.d.ts +1 -2
- package/dist/shared/bricks/props/types.d.ts.map +1 -1
- package/dist/shared/bricks.d.ts +189 -18
- package/dist/shared/bricks.d.ts.map +1 -1
- package/dist/shared/bricks.js +1 -1
- package/dist/shared/chunk-2CYAFF56.js +3 -0
- package/dist/shared/chunk-2NLDX5FG.js +3 -0
- package/dist/shared/chunk-3FPFR5RA.js +3 -0
- package/dist/shared/chunk-3P36LG6T.js +3 -0
- package/dist/shared/chunk-3QOAHMV4.js +5 -0
- package/dist/shared/chunk-46YDGGFF.js +3 -0
- package/dist/shared/chunk-4GIZ6WSG.js +3 -0
- package/dist/shared/chunk-5DZIQGY2.js +3 -0
- package/dist/shared/chunk-5WY7LYXK.js +3 -0
- package/dist/shared/chunk-5X5SX5N7.js +4 -0
- package/dist/shared/chunk-6L3Z5SZQ.js +3 -0
- package/dist/shared/{chunk-UU2MSQXY.js → chunk-6PGAWO4H.js} +1 -1
- package/dist/shared/chunk-6R76KIHZ.js +3 -0
- package/dist/shared/chunk-7UBMXMNJ.js +3 -0
- package/dist/shared/chunk-AB3IMRXZ.js +3 -0
- package/dist/shared/chunk-AMQAGDFH.js +3 -0
- package/dist/shared/chunk-ARMM6B47.js +3 -0
- package/dist/shared/chunk-ARYG4XMX.js +3 -0
- package/dist/shared/chunk-AZHH3XJJ.js +3 -0
- package/dist/shared/chunk-DHSWVVMI.js +3 -0
- package/dist/shared/chunk-DKNOZLA6.js +3 -0
- package/dist/shared/chunk-EVDZ2KND.js +6 -0
- package/dist/shared/chunk-F4JNKU7J.js +3 -0
- package/dist/shared/chunk-GC5OWY2Z.js +3 -0
- package/dist/shared/chunk-HP7CZB2F.js +3 -0
- package/dist/shared/chunk-HSRXUIVM.js +3 -0
- package/dist/shared/chunk-ILIWVWHC.js +8 -0
- package/dist/shared/chunk-JRCVYDCD.js +3 -0
- package/dist/shared/chunk-K5ADUHF4.js +3 -0
- package/dist/shared/chunk-L2HOZVBC.js +3 -0
- package/dist/shared/chunk-LEWKHCRI.js +3 -0
- package/dist/shared/chunk-LT4CW2F7.js +3 -0
- package/dist/shared/chunk-ML4JSDQM.js +34 -0
- package/dist/shared/chunk-MVCVVKBY.js +3 -0
- package/dist/shared/chunk-NKIEDT7V.js +3 -0
- package/dist/shared/chunk-NQKXDMQ5.js +3 -0
- package/dist/shared/chunk-PO6UODZ5.js +8 -0
- package/dist/shared/chunk-PW5HRVMD.js +3 -0
- package/dist/shared/chunk-PZYX3ACO.js +3 -0
- package/dist/shared/chunk-QGFQA7OZ.js +4 -0
- package/dist/shared/chunk-RJZZWCBD.js +3 -0
- package/dist/shared/chunk-SAJY7H6N.js +3 -0
- package/dist/shared/chunk-SFDRAHYP.js +3 -0
- package/dist/shared/chunk-STDCM2KD.js +3 -0
- package/dist/shared/chunk-TH5SONR6.js +3 -0
- package/dist/shared/chunk-UCR2UZOY.js +3 -0
- package/dist/shared/chunk-UDQWYGSO.js +3 -0
- package/dist/shared/{chunk-LSPN22SI.js → chunk-URRCKLAS.js} +3 -3
- package/dist/shared/{chunk-OIOYMECS.js → chunk-US53TNMK.js} +1 -1
- package/dist/shared/chunk-VDX2J22H.js +3 -0
- package/dist/shared/chunk-VK26ZZFR.js +3 -0
- package/dist/shared/chunk-VLXZMESE.js +3 -0
- package/dist/shared/chunk-WAML3IGZ.js +3 -0
- package/dist/shared/chunk-WXKRIUTA.js +3 -0
- package/dist/shared/chunk-X62OEAE6.js +3 -0
- package/dist/shared/chunk-XED6ARVN.js +3 -0
- package/dist/shared/chunk-XZLBM4AX.js +3 -0
- package/dist/shared/chunk-Y3X4F4YJ.js +3 -0
- package/dist/shared/chunk-Z4YKRLOX.js +3 -0
- package/dist/shared/context.d.ts +4 -12
- package/dist/shared/context.d.ts.map +1 -1
- package/dist/shared/datarecords/external/airtable/handler.d.ts +22 -5
- package/dist/shared/datarecords/external/airtable/handler.d.ts.map +1 -1
- package/dist/shared/datarecords/external/airtable/handler.js +1 -1
- package/dist/shared/datarecords/external/airtable/oauth/config.js +3 -0
- package/dist/shared/datarecords/external/airtable/types.d.ts +25 -0
- package/dist/shared/datarecords/external/airtable/types.d.ts.map +1 -1
- package/dist/shared/datarecords/external/airtable/types.js +3 -0
- package/dist/shared/datarecords/external/generic-webhook/handler.js +3 -0
- package/dist/shared/datarecords/external/generic-webhook/options.js +3 -0
- package/dist/shared/datarecords/external/google/sheets/client.js +3 -0
- package/dist/shared/datarecords/external/google/sheets/handler.d.ts +29 -5
- package/dist/shared/datarecords/external/google/sheets/handler.d.ts.map +1 -1
- package/dist/shared/datarecords/external/google/sheets/handler.js +5 -4
- package/dist/shared/datarecords/external/google/sheets/{options.d.ts → types.d.ts} +1 -1
- package/dist/shared/datarecords/external/google/sheets/types.d.ts.map +1 -0
- package/dist/shared/datarecords/external/google/sheets/types.js +3 -0
- package/dist/shared/datarecords/external/notion/handler.d.ts +29 -7
- package/dist/shared/datarecords/external/notion/handler.d.ts.map +1 -1
- package/dist/shared/datarecords/external/notion/handler.js +1 -1
- package/dist/shared/datarecords/external/notion/oauth/config.js +3 -0
- package/dist/shared/datarecords/external/notion/{options.d.ts → types.d.ts} +11 -1
- package/dist/shared/datarecords/external/notion/types.d.ts.map +1 -0
- package/dist/shared/datarecords/external/notion/types.js +3 -0
- package/dist/shared/datarecords/types.d.ts +17 -165
- package/dist/shared/datarecords/types.d.ts.map +1 -1
- package/dist/shared/datarecords/types.js +1 -1
- package/dist/shared/datarecords.d.ts +2 -2
- package/dist/shared/datarecords.d.ts.map +1 -1
- package/dist/shared/datarecords.js +1 -1
- package/dist/shared/datasources/external/facebook/posts/fetcher.js +3 -0
- package/dist/shared/datasources/external/facebook/posts/schema.js +3 -0
- package/dist/shared/datasources/external/http-json/fetcher.js +3 -0
- package/dist/shared/datasources/external/http-json/options.js +3 -0
- package/dist/shared/datasources/external/http-json/schema.js +3 -0
- package/dist/shared/datasources/external/instagram/feed/fetcher.js +3 -0
- package/dist/shared/datasources/external/instagram/feed/schema.js +3 -0
- package/dist/shared/datasources/external/mastodon/account/fetcher.js +3 -0
- package/dist/shared/datasources/external/mastodon/account/schema.js +3 -0
- package/dist/shared/datasources/external/mastodon/options.js +3 -0
- package/dist/shared/datasources/external/mastodon/status/fetcher.js +3 -0
- package/dist/shared/datasources/external/mastodon/status/sample.array.js +3 -0
- package/dist/shared/datasources/external/mastodon/status/sample.single.js +3 -0
- package/dist/shared/datasources/external/mastodon/status/schema.d.ts.map +1 -1
- package/dist/shared/datasources/external/mastodon/status/schema.js +3 -0
- package/dist/shared/datasources/external/meta/options.js +3 -0
- package/dist/shared/datasources/external/rss/fetcher.js +3 -0
- package/dist/shared/datasources/external/rss/options.js +3 -0
- package/dist/shared/datasources/external/rss/schema.js +3 -0
- package/dist/shared/datasources/external/threads/media/fetcher.js +3 -0
- package/dist/shared/datasources/external/threads/media/schema.js +3 -0
- package/dist/shared/datasources/external/tiktok/video/fetcher.js +3 -0
- package/dist/shared/datasources/external/tiktok/video/options.js +3 -0
- package/dist/shared/datasources/external/tiktok/video/schema.js +3 -0
- package/dist/shared/datasources/external/youtube/list/fetcher.js +3 -0
- package/dist/shared/datasources/external/youtube/list/options.js +3 -0
- package/dist/shared/datasources/external/youtube/list/schema.js +3 -0
- package/dist/shared/datasources/fetcher.js +2 -0
- package/dist/shared/datasources/internal/blog/schema.js +3 -0
- package/dist/shared/datasources/internal/changelog/schema.js +3 -0
- package/dist/shared/datasources/internal/contact-info/schema.js +3 -0
- package/dist/shared/datasources/internal/cv/schema.js +3 -0
- package/dist/shared/datasources/internal/faq/schema.js +3 -0
- package/dist/shared/datasources/internal/job-board/schema.js +3 -0
- package/dist/shared/datasources/internal/links/schema.js +3 -0
- package/dist/shared/datasources/internal/recipes/schema.js +3 -0
- package/dist/shared/datasources/internal/restaurant/schema.js +3 -0
- package/dist/shared/datasources/samples.js +3 -0
- package/dist/shared/datasources/schemas.d.ts +0 -49
- package/dist/shared/datasources/schemas.d.ts.map +1 -1
- package/dist/shared/datasources/schemas.js +1 -1
- package/dist/shared/datasources/types.d.ts +53 -130
- package/dist/shared/datasources/types.d.ts.map +1 -1
- package/dist/shared/datasources/types.js +1 -1
- package/dist/shared/datasources/utils.js +3 -0
- package/dist/shared/datasources.d.ts +7 -4
- package/dist/shared/datasources.d.ts.map +1 -1
- package/dist/shared/datasources.js +1 -1
- package/dist/shared/errors.js +1 -1
- package/dist/shared/images.d.ts +1 -12
- package/dist/shared/images.d.ts.map +1 -1
- package/dist/shared/images.js +1 -1
- package/dist/shared/index.js +3 -0
- package/dist/shared/manifest.js +3 -0
- package/dist/shared/page.d.ts +143 -12
- package/dist/shared/page.d.ts.map +1 -1
- package/dist/shared/page.js +1 -1
- package/dist/shared/site.d.ts +224 -114
- package/dist/shared/site.d.ts.map +1 -1
- package/dist/shared/site.js +1 -1
- package/dist/shared/sitemap.d.ts +167 -23
- package/dist/shared/sitemap.d.ts.map +1 -1
- package/dist/shared/sitemap.js +1 -1
- package/dist/shared/social-icons.js +3 -0
- package/dist/shared/theme.d.ts +41 -4
- package/dist/shared/theme.d.ts.map +1 -1
- package/dist/shared/theme.js +1 -1
- package/dist/shared/utils/invariant.js +1 -1
- package/dist/shared/utils/llm.d.ts +19 -0
- package/dist/shared/utils/llm.d.ts.map +1 -0
- package/dist/shared/utils/llm.js +3 -0
- package/dist/shared/utils/schema.d.ts +6 -1
- package/dist/shared/utils/schema.d.ts.map +1 -1
- package/dist/shared/utils/schema.js +1 -1
- package/dist/shared/utils/tests/schema.test.d.ts +2 -0
- package/dist/shared/utils/tests/schema.test.d.ts.map +1 -0
- package/dist/shared/utils/typed-ref.d.ts +1 -6
- package/dist/shared/utils/typed-ref.d.ts.map +1 -1
- package/dist/shared/utils/typed-ref.js +1 -1
- package/package.json +18 -19
- package/src/shared/ai/schemas.ts +33 -0
- package/src/shared/ai/types.ts +155 -0
- package/src/shared/ajv.ts +123 -0
- package/src/shared/analytics/init.ts +14 -0
- package/src/shared/analytics/track.ts +21 -0
- package/src/shared/analytics/types.ts +13 -0
- package/src/shared/attributes.ts +396 -0
- package/src/shared/brick-manifest.ts +119 -0
- package/src/shared/bricks/manifests/accordion.manifest.ts +482 -0
- package/src/shared/bricks/manifests/all-manifests.ts +121 -0
- package/src/shared/bricks/manifests/box.manifest.ts +551 -0
- package/src/shared/bricks/manifests/button.manifest.ts +208 -0
- package/src/shared/bricks/manifests/card.manifest.ts +320 -0
- package/src/shared/bricks/manifests/carousel.manifest.ts +708 -0
- package/src/shared/bricks/manifests/footer.manifest.ts +509 -0
- package/src/shared/bricks/manifests/form.manifest.ts +226 -0
- package/src/shared/bricks/manifests/hero.manifest.ts +365 -0
- package/src/shared/bricks/manifests/html.manifest.ts +127 -0
- package/src/shared/bricks/manifests/icon.manifest.ts +164 -0
- package/src/shared/bricks/manifests/image.manifest.ts +378 -0
- package/src/shared/bricks/manifests/images-gallery.manifest.ts +822 -0
- package/src/shared/bricks/manifests/map.manifest.ts +215 -0
- package/src/shared/bricks/manifests/navbar.manifest.ts +361 -0
- package/src/shared/bricks/manifests/sidebar.manifest.ts +88 -0
- package/src/shared/bricks/manifests/social-links.manifest.ts +497 -0
- package/src/shared/bricks/manifests/spacer.manifest.ts +54 -0
- package/src/shared/bricks/manifests/testimonials.manifest.ts +480 -0
- package/src/shared/bricks/manifests/tests/header.manifest.test.ts +10 -0
- package/src/shared/bricks/manifests/text.manifest.ts +245 -0
- package/src/shared/bricks/manifests/video.manifest.ts +115 -0
- package/src/shared/bricks/props/align.ts +63 -0
- package/src/shared/bricks/props/background.ts +79 -0
- package/src/shared/bricks/props/boolean.ts +7 -0
- package/src/shared/bricks/props/border.ts +86 -0
- package/src/shared/bricks/props/color-preset.ts +390 -0
- package/src/shared/bricks/props/color.ts +40 -0
- package/src/shared/bricks/props/common.ts +64 -0
- package/src/shared/bricks/props/css-length.ts +32 -0
- package/src/shared/bricks/props/datarecord.ts +11 -0
- package/src/shared/bricks/props/datasource.ts +82 -0
- package/src/shared/bricks/props/date.ts +21 -0
- package/src/shared/bricks/props/direction.ts +21 -0
- package/src/shared/bricks/props/dynamic.ts +112 -0
- package/src/shared/bricks/props/effects.ts +71 -0
- package/src/shared/bricks/props/enum.ts +38 -0
- package/src/shared/bricks/props/file.ts +10 -0
- package/src/shared/bricks/props/geolocation.ts +36 -0
- package/src/shared/bricks/props/helpers.ts +73 -0
- package/src/shared/bricks/props/image.ts +96 -0
- package/src/shared/bricks/props/number.ts +8 -0
- package/src/shared/bricks/props/position.ts +11 -0
- package/src/shared/bricks/props/string.ts +72 -0
- package/src/shared/bricks/props/tags.ts +26 -0
- package/src/shared/bricks/props/tests/background.test.ts +90 -0
- package/src/shared/bricks/props/tests/border.test.ts +12 -0
- package/src/shared/bricks/props/tests/effects.test.ts +37 -0
- package/src/shared/bricks/props/tests/helpers.test.ts +98 -0
- package/src/shared/bricks/props/tests/image.test.ts +71 -0
- package/src/shared/bricks/props/tests/string.test.ts +80 -0
- package/src/shared/bricks/props/text.ts +107 -0
- package/src/shared/bricks/props/types.ts +72 -0
- package/src/shared/bricks.ts +1237 -0
- package/src/shared/context.ts +32 -0
- package/src/shared/datarecords/external/airtable/handler.ts +501 -0
- package/src/shared/datarecords/external/airtable/oauth/config.ts +11 -0
- package/src/shared/datarecords/external/airtable/types.ts +63 -0
- package/src/shared/datarecords/external/generic-webhook/handler.ts +10 -0
- package/src/shared/datarecords/external/generic-webhook/options.ts +13 -0
- package/src/shared/datarecords/external/google/oauth/config.ts +30 -0
- package/src/shared/datarecords/external/google/sheets/client.ts +112 -0
- package/src/shared/datarecords/external/google/sheets/handler.ts +253 -0
- package/src/shared/datarecords/external/google/sheets/types.ts +10 -0
- package/src/shared/datarecords/external/notion/handler.ts +469 -0
- package/src/shared/datarecords/external/notion/oauth/config.ts +7 -0
- package/src/shared/datarecords/external/notion/types.ts +28 -0
- package/src/shared/datarecords/types.ts +165 -0
- package/src/shared/datarecords.ts +5 -0
- package/src/shared/datasources/README.md +3 -0
- package/src/shared/datasources/external/facebook/posts/fetcher.ts +52 -0
- package/src/shared/datasources/external/facebook/posts/sample.ts +35 -0
- package/src/shared/datasources/external/facebook/posts/schema.ts +33 -0
- package/src/shared/datasources/external/facebook/posts/tests/fetcher.test.ts +73 -0
- package/src/shared/datasources/external/http-json/fetcher.ts +31 -0
- package/src/shared/datasources/external/http-json/options.ts +8 -0
- package/src/shared/datasources/external/http-json/schema.ts +6 -0
- package/src/shared/datasources/external/http-json/tests/fetcher.test.ts +70 -0
- package/src/shared/datasources/external/instagram/feed/fetcher.ts +33 -0
- package/src/shared/datasources/external/instagram/feed/sample.ts +22 -0
- package/src/shared/datasources/external/instagram/feed/schema.ts +23 -0
- package/src/shared/datasources/external/instagram/feed/tests/fetcher.test.ts +64 -0
- package/src/shared/datasources/external/mastodon/account/fetcher.ts +24 -0
- package/src/shared/datasources/external/mastodon/account/sample.ts +33 -0
- package/src/shared/datasources/external/mastodon/account/schema.ts +45 -0
- package/src/shared/datasources/external/mastodon/account/tests/fetcher.test.ts +47 -0
- package/src/shared/datasources/external/mastodon/options.ts +6 -0
- package/src/shared/datasources/external/mastodon/status/fetcher.ts +35 -0
- package/src/shared/datasources/external/mastodon/status/sample.array.ts +59 -0
- package/src/shared/datasources/external/mastodon/status/sample.single.ts +55 -0
- package/src/shared/datasources/external/mastodon/status/schema.ts +125 -0
- package/src/shared/datasources/external/mastodon/status/tests/fetcher.test.ts +74 -0
- package/src/shared/datasources/external/meta/oauth/config.ts +16 -0
- package/src/shared/datasources/external/meta/options.ts +7 -0
- package/src/shared/datasources/external/rss/fetcher.ts +31 -0
- package/src/shared/datasources/external/rss/options.ts +7 -0
- package/src/shared/datasources/external/rss/sample.ts +22 -0
- package/src/shared/datasources/external/rss/schema.ts +42 -0
- package/src/shared/datasources/external/threads/media/fetcher.ts +53 -0
- package/src/shared/datasources/external/threads/media/sample.ts +44 -0
- package/src/shared/datasources/external/threads/media/schema.ts +37 -0
- package/src/shared/datasources/external/tiktok/oauth/config.ts +17 -0
- package/src/shared/datasources/external/tiktok/video/fetcher.ts +39 -0
- package/src/shared/datasources/external/tiktok/video/options.ts +8 -0
- package/src/shared/datasources/external/tiktok/video/sample.ts +26 -0
- package/src/shared/datasources/external/tiktok/video/schema.ts +27 -0
- package/src/shared/datasources/external/youtube/list/fetcher.ts +37 -0
- package/src/shared/datasources/external/youtube/list/options.ts +11 -0
- package/src/shared/datasources/external/youtube/list/sample.ts +33 -0
- package/src/shared/datasources/external/youtube/list/schema.ts +38 -0
- package/src/shared/datasources/external/youtube/oauth/config.ts +15 -0
- package/src/shared/datasources/fetcher.ts +16 -0
- package/src/shared/datasources/internal/blog/schema.ts +69 -0
- package/src/shared/datasources/internal/changelog/schema.ts +48 -0
- package/src/shared/datasources/internal/contact-info/schema.ts +20 -0
- package/src/shared/datasources/internal/cv/schema.ts +217 -0
- package/src/shared/datasources/internal/faq/schema.ts +27 -0
- package/src/shared/datasources/internal/job-board/schema.ts +228 -0
- package/src/shared/datasources/internal/links/schema.ts +15 -0
- package/src/shared/datasources/internal/recipes/schema.ts +42 -0
- package/src/shared/datasources/internal/restaurant/schema.ts +225 -0
- package/src/shared/datasources/samples.ts +26 -0
- package/src/shared/datasources/schemas.ts +48 -0
- package/src/shared/datasources/types.ts +490 -0
- package/src/shared/datasources/utils.ts +17 -0
- package/src/shared/datasources.ts +57 -0
- package/src/shared/env.ts +23 -0
- package/src/shared/errors.ts +1 -0
- package/src/shared/images.ts +44 -0
- package/src/shared/index.ts +3 -0
- package/src/shared/layout-constants.ts +19 -0
- package/src/shared/manifest.ts +50 -0
- package/src/shared/oauth.ts +16 -0
- package/src/shared/page.ts +36 -0
- package/src/shared/prompt.ts +9 -0
- package/src/shared/responsive.ts +5 -0
- package/src/shared/site.ts +59 -0
- package/src/shared/sitemap.ts +98 -0
- package/src/shared/social-icons.ts +307 -0
- package/src/shared/tests/attributes.test.ts +31 -0
- package/src/shared/theme.ts +244 -0
- package/src/shared/themes/README.md +34 -0
- package/src/shared/themes/color-system.ts +146 -0
- package/src/shared/themes/tests/color-system.test.ts +170 -0
- package/src/shared/utils/canvas-data-uri.ts +2 -0
- package/src/shared/utils/invariant.ts +25 -0
- package/src/shared/utils/json-date.ts +8 -0
- package/src/shared/utils/llm.ts +282 -0
- package/src/shared/utils/merge.ts +12 -0
- package/src/shared/utils/object-hash.ts +7 -0
- package/src/shared/utils/schema.ts +359 -0
- package/src/shared/utils/string-enum.ts +12 -0
- package/src/shared/utils/tests/schema.test.ts +724 -0
- package/src/shared/utils/try-catch.ts +12 -0
- package/src/shared/utils/typed-ref.ts +53 -0
- package/dist/shared/bricks/props/container.d.ts +0 -11
- package/dist/shared/bricks/props/container.d.ts.map +0 -1
- package/dist/shared/bricks/props/container.js +0 -3
- package/dist/shared/bricks/props/gap.d.ts +0 -9
- package/dist/shared/bricks/props/gap.d.ts.map +0 -1
- package/dist/shared/bricks/props/gap.js +0 -3
- package/dist/shared/bricks/props/padding.d.ts +0 -5
- package/dist/shared/bricks/props/padding.d.ts.map +0 -1
- package/dist/shared/bricks/props/padding.js +0 -3
- package/dist/shared/bricks/props/tests/padding.d.ts +0 -2
- package/dist/shared/bricks/props/tests/padding.d.ts.map +0 -1
- package/dist/shared/chunk-2IYSJYNE.js +0 -3
- package/dist/shared/chunk-3EM3B4DX.js +0 -3
- package/dist/shared/chunk-4TH3C76A.js +0 -3
- package/dist/shared/chunk-5N6MBJJ4.js +0 -3
- package/dist/shared/chunk-6FITVVZX.js +0 -3
- package/dist/shared/chunk-6WCGUAQN.js +0 -3
- package/dist/shared/chunk-7DMUDZ4H.js +0 -3
- package/dist/shared/chunk-ACVLF55Q.js +0 -3
- package/dist/shared/chunk-AQPN5SE2.js +0 -3
- package/dist/shared/chunk-BZGNY7LB.js +0 -3
- package/dist/shared/chunk-C3VGP4CA.js +0 -3
- package/dist/shared/chunk-CT3EI7YN.js +0 -3
- package/dist/shared/chunk-DQXDGV67.js +0 -3
- package/dist/shared/chunk-E22E4XWE.js +0 -3
- package/dist/shared/chunk-ETYYRWLK.js +0 -3
- package/dist/shared/chunk-EYPREFMH.js +0 -3
- package/dist/shared/chunk-FKNNTHWX.js +0 -5
- package/dist/shared/chunk-HHO3ONTQ.js +0 -3
- package/dist/shared/chunk-I46VBMLF.js +0 -3
- package/dist/shared/chunk-IIFTGWFZ.js +0 -3
- package/dist/shared/chunk-JS4K5JRM.js +0 -5
- package/dist/shared/chunk-KHFNN4P3.js +0 -3
- package/dist/shared/chunk-L6WHBSRZ.js +0 -8
- package/dist/shared/chunk-LFQZRGHS.js +0 -3
- package/dist/shared/chunk-LGP6GWIY.js +0 -3
- package/dist/shared/chunk-NLEWXPVM.js +0 -3
- package/dist/shared/chunk-NNI225RG.js +0 -3
- package/dist/shared/chunk-QISTDGPP.js +0 -3
- package/dist/shared/chunk-QSZWDE3D.js +0 -3
- package/dist/shared/chunk-RGLVKILY.js +0 -3
- package/dist/shared/chunk-SLRU4CT6.js +0 -4
- package/dist/shared/chunk-T3LIA4YB.js +0 -3
- package/dist/shared/chunk-T4LMBG2G.js +0 -3
- package/dist/shared/chunk-TATG6SFZ.js +0 -3
- package/dist/shared/chunk-TF3JVVRU.js +0 -3
- package/dist/shared/chunk-TTTXV7TJ.js +0 -6
- package/dist/shared/chunk-TWBY2GOR.js +0 -3
- package/dist/shared/chunk-UAQHU6L6.js +0 -3
- package/dist/shared/chunk-UHF6IEKV.js +0 -3
- package/dist/shared/chunk-UMHXXXVP.js +0 -3
- package/dist/shared/chunk-VGRYSAXA.js +0 -3
- package/dist/shared/chunk-VPFCY4DH.js +0 -3
- package/dist/shared/chunk-VZPXXFVX.js +0 -3
- package/dist/shared/chunk-WU6Q4WYD.js +0 -3
- package/dist/shared/chunk-X43MB5WD.js +0 -3
- package/dist/shared/chunk-YBGPPF7T.js +0 -3
- package/dist/shared/chunk-YFFTZ5T6.js +0 -3
- package/dist/shared/chunk-ZQGNYK5I.js +0 -8
- package/dist/shared/chunk-ZTDUXSWH.js +0 -3
- package/dist/shared/datarecords/external/airtable/client.d.ts +0 -8
- package/dist/shared/datarecords/external/airtable/client.d.ts.map +0 -1
- package/dist/shared/datarecords/external/airtable/elements.d.ts +0 -21
- package/dist/shared/datarecords/external/airtable/elements.d.ts.map +0 -1
- package/dist/shared/datarecords/external/airtable/options.d.ts +0 -10
- package/dist/shared/datarecords/external/airtable/options.d.ts.map +0 -1
- package/dist/shared/datarecords/external/google/sheets/options.d.ts.map +0 -1
- package/dist/shared/datarecords/external/notion/client.d.ts +0 -8
- package/dist/shared/datarecords/external/notion/client.d.ts.map +0 -1
- package/dist/shared/datarecords/external/notion/options.d.ts.map +0 -1
- package/dist/shared/datarecords/external/notion/utils.d.ts +0 -5
- package/dist/shared/datarecords/external/notion/utils.d.ts.map +0 -1
- package/dist/shared/utils/schema-resolver.d.ts +0 -3
- package/dist/shared/utils/schema-resolver.d.ts.map +0 -1
- package/dist/shared/utils/schema-resolver.js +0 -3
|
@@ -0,0 +1,1237 @@
|
|
|
1
|
+
import { Type, type Static, type TObject } from "@sinclair/typebox";
|
|
2
|
+
import { customAlphabet } from "nanoid";
|
|
3
|
+
import { brickTypes, defaultProps } from "./bricks/manifests/all-manifests";
|
|
4
|
+
import { cssLengthRef } from "./bricks/props/css-length";
|
|
5
|
+
import { enumProp } from "./bricks/props/enum";
|
|
6
|
+
import { colorPresetRef } from "./bricks/props/color-preset";
|
|
7
|
+
import { mergeIgnoringArrays } from "./utils/merge";
|
|
8
|
+
import { getSchemaDefaults } from "./utils/schema";
|
|
9
|
+
import { StringEnum } from "./utils/string-enum";
|
|
10
|
+
import { alignItemsRef, justifyContentRef } from "./bricks/props/align";
|
|
11
|
+
import type { CommonBrickProps } from "./bricks/props/common";
|
|
12
|
+
import { directionRef } from "./bricks/props/direction";
|
|
13
|
+
import type { PageAttributes, SiteAttributes } from "./attributes";
|
|
14
|
+
import { toLLMSchema } from "./utils/llm";
|
|
15
|
+
import { backgroundRef } from "./bricks/props/background";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Generates a unique identifier for bricks.
|
|
19
|
+
*/
|
|
20
|
+
export const generateId = customAlphabet("azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN", 7);
|
|
21
|
+
|
|
22
|
+
const brickAbsolutePositionSchema = Type.Object({
|
|
23
|
+
left: Type.Optional(
|
|
24
|
+
Type.String({
|
|
25
|
+
title: "top",
|
|
26
|
+
description: "The left position in css unit.",
|
|
27
|
+
}),
|
|
28
|
+
),
|
|
29
|
+
top: Type.Optional(
|
|
30
|
+
Type.String({
|
|
31
|
+
title: "top",
|
|
32
|
+
description: "The top position in css unit.",
|
|
33
|
+
}),
|
|
34
|
+
),
|
|
35
|
+
right: Type.Optional(
|
|
36
|
+
Type.String({
|
|
37
|
+
title: "right",
|
|
38
|
+
description: "The right position in css unit.",
|
|
39
|
+
}),
|
|
40
|
+
),
|
|
41
|
+
bottom: Type.Optional(
|
|
42
|
+
Type.String({
|
|
43
|
+
title: "bottom",
|
|
44
|
+
description: "The bottom position in css unit.",
|
|
45
|
+
}),
|
|
46
|
+
),
|
|
47
|
+
inset: Type.Optional(
|
|
48
|
+
Type.String({
|
|
49
|
+
title: "inset",
|
|
50
|
+
description: "The inset position in css unit.",
|
|
51
|
+
}),
|
|
52
|
+
),
|
|
53
|
+
translateX: Type.Optional(
|
|
54
|
+
Type.String({
|
|
55
|
+
title: "translateX",
|
|
56
|
+
description: "The translateX position in css unit.",
|
|
57
|
+
}),
|
|
58
|
+
),
|
|
59
|
+
translateY: Type.Optional(
|
|
60
|
+
Type.String({
|
|
61
|
+
title: "translateY",
|
|
62
|
+
description: "The translateY position in css unit.",
|
|
63
|
+
}),
|
|
64
|
+
),
|
|
65
|
+
rotate: Type.Optional(
|
|
66
|
+
Type.String({
|
|
67
|
+
title: "rotate",
|
|
68
|
+
description: "The rotate position in css unit.",
|
|
69
|
+
}),
|
|
70
|
+
),
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
export type BrickAbsolutePosition = Static<typeof brickAbsolutePositionSchema>;
|
|
74
|
+
|
|
75
|
+
export const brickTypeSchema = StringEnum(Object.keys(defaultProps), {
|
|
76
|
+
title: "Brick type",
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
export const brickSchema = Type.Object(
|
|
80
|
+
{
|
|
81
|
+
id: Type.String({
|
|
82
|
+
title: "ID",
|
|
83
|
+
description: "A unique identifier for the brick.",
|
|
84
|
+
}),
|
|
85
|
+
type: brickTypeSchema,
|
|
86
|
+
props: Type.Any({
|
|
87
|
+
title: "Props",
|
|
88
|
+
description: "The static props of the brick. The available props depends on the brick type.",
|
|
89
|
+
}),
|
|
90
|
+
mobileProps: Type.Optional(
|
|
91
|
+
Type.Any({
|
|
92
|
+
title: "Props",
|
|
93
|
+
description: "The overriden props for mobile, merged with desktop props.",
|
|
94
|
+
}),
|
|
95
|
+
),
|
|
96
|
+
},
|
|
97
|
+
{ additionalProperties: true },
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
export function makeFullBrickSchemaForLLM(type: string, props: TObject) {
|
|
101
|
+
return toLLMSchema(
|
|
102
|
+
Type.Object(
|
|
103
|
+
{
|
|
104
|
+
id: Type.String({
|
|
105
|
+
title: "ID",
|
|
106
|
+
description: "A unique identifier for the brick.",
|
|
107
|
+
}),
|
|
108
|
+
type: Type.Literal(type),
|
|
109
|
+
props,
|
|
110
|
+
mobileProps: Type.Optional(Type.Partial(props)),
|
|
111
|
+
},
|
|
112
|
+
{ additionalProperties: false },
|
|
113
|
+
),
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export type Brick = Omit<Static<typeof brickSchema>, "props" | "mobileProps"> & {
|
|
118
|
+
props: CommonBrickProps & Record<string, unknown>;
|
|
119
|
+
mobileProps?: CommonBrickProps & Record<string, unknown>;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export const sectionProps = Type.Object(
|
|
123
|
+
{
|
|
124
|
+
colorPreset: Type.Optional(
|
|
125
|
+
colorPresetRef({
|
|
126
|
+
title: "Color",
|
|
127
|
+
}),
|
|
128
|
+
),
|
|
129
|
+
backgroundImage: Type.Optional(
|
|
130
|
+
backgroundRef({
|
|
131
|
+
title: "Background",
|
|
132
|
+
description:
|
|
133
|
+
"The background image of the section. Prefer to set background images on sections rather than on individual bricks.",
|
|
134
|
+
}),
|
|
135
|
+
),
|
|
136
|
+
direction: directionRef({
|
|
137
|
+
default: "flex-row",
|
|
138
|
+
title: "Direction",
|
|
139
|
+
description: "The direction of the section. Only apply to desktop. On mobile, it is always vertical.",
|
|
140
|
+
"ui:responsive": "desktop",
|
|
141
|
+
}),
|
|
142
|
+
minHeight: Type.Optional(
|
|
143
|
+
cssLengthRef({
|
|
144
|
+
title: "Min height",
|
|
145
|
+
default: "fit-content",
|
|
146
|
+
description: "The min height of the section",
|
|
147
|
+
"ui:field": "hidden",
|
|
148
|
+
}),
|
|
149
|
+
),
|
|
150
|
+
variant: Type.Optional(
|
|
151
|
+
StringEnum(["navbar", "footer", "sidebar"], {
|
|
152
|
+
title: "Custom section variant",
|
|
153
|
+
description: "Used for custom styling and layout.",
|
|
154
|
+
enumNames: ["Navbar", "Footer", "Sidebar"],
|
|
155
|
+
"ui:field": "hidden",
|
|
156
|
+
"ai:hidden": true,
|
|
157
|
+
}),
|
|
158
|
+
),
|
|
159
|
+
maxWidth: Type.Optional(
|
|
160
|
+
enumProp("Max width", "max-w-full", {
|
|
161
|
+
options: [
|
|
162
|
+
{
|
|
163
|
+
value: "max-w-screen-lg",
|
|
164
|
+
title: "M",
|
|
165
|
+
description: "Common for text-heavy content/blog posts",
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
value: "max-w-screen-xl",
|
|
169
|
+
title: "L",
|
|
170
|
+
description: "Usefull or some landing pages",
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
value: "max-w-screen-2xl",
|
|
174
|
+
title: "XL",
|
|
175
|
+
description: "Common width",
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
value: "max-w-full",
|
|
179
|
+
title: "Full",
|
|
180
|
+
description: "Takes the entire space",
|
|
181
|
+
},
|
|
182
|
+
],
|
|
183
|
+
description: "The maximum width of the section. Desktop only",
|
|
184
|
+
"ai:instructions":
|
|
185
|
+
"Choose the most appropriate max width for the section. You will likely use the same max width for all sections in a page.",
|
|
186
|
+
displayAs: "button-group",
|
|
187
|
+
"ui:responsive": "desktop",
|
|
188
|
+
}),
|
|
189
|
+
),
|
|
190
|
+
justifyContent: Type.Optional(
|
|
191
|
+
justifyContentRef({
|
|
192
|
+
default: "justify-center",
|
|
193
|
+
}),
|
|
194
|
+
),
|
|
195
|
+
alignItems: Type.Optional(
|
|
196
|
+
alignItemsRef({
|
|
197
|
+
default: "items-center",
|
|
198
|
+
}),
|
|
199
|
+
),
|
|
200
|
+
padding: Type.Optional(
|
|
201
|
+
cssLengthRef({
|
|
202
|
+
default: "2rem",
|
|
203
|
+
description: "Padding inside the section.",
|
|
204
|
+
title: "Padding",
|
|
205
|
+
"ui:responsive": true,
|
|
206
|
+
"ui:placeholder": "Not specified",
|
|
207
|
+
"ui:styleId": "styles:padding",
|
|
208
|
+
}),
|
|
209
|
+
),
|
|
210
|
+
gap: Type.Optional(
|
|
211
|
+
cssLengthRef({
|
|
212
|
+
title: "Gap",
|
|
213
|
+
description: "The gap between the bricks in the section.",
|
|
214
|
+
default: "20px",
|
|
215
|
+
"ui:styleId": "styles:gap",
|
|
216
|
+
}),
|
|
217
|
+
),
|
|
218
|
+
wrap: Type.Optional(
|
|
219
|
+
Type.Boolean({
|
|
220
|
+
title: "Wrap",
|
|
221
|
+
description: "Wrap bricks if they overflow the section.",
|
|
222
|
+
default: true,
|
|
223
|
+
"ui:styleId": "styles:wrap",
|
|
224
|
+
}),
|
|
225
|
+
),
|
|
226
|
+
lastTouched: Type.Optional(
|
|
227
|
+
Type.Number({
|
|
228
|
+
description: "Do not use this field. It is used internally by the editor.",
|
|
229
|
+
"ui:field": "hidden",
|
|
230
|
+
"ai:hidden": true,
|
|
231
|
+
}),
|
|
232
|
+
),
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
additionalProperties: false,
|
|
236
|
+
},
|
|
237
|
+
);
|
|
238
|
+
|
|
239
|
+
export const sectionSchema = Type.Object(
|
|
240
|
+
{
|
|
241
|
+
id: Type.String({
|
|
242
|
+
description: "The unique ID of the section. Use a human readable url-safe slug",
|
|
243
|
+
examples: ["content-section", "contact-section"],
|
|
244
|
+
}),
|
|
245
|
+
label: Type.Optional(
|
|
246
|
+
Type.String({
|
|
247
|
+
description: "The label of the section. Used for editor purposes only.",
|
|
248
|
+
examples: ["Content", "Contact"],
|
|
249
|
+
}),
|
|
250
|
+
),
|
|
251
|
+
order: Type.Number({
|
|
252
|
+
description: "Determines section order in the page (lower numbers appear first). 0-based",
|
|
253
|
+
}),
|
|
254
|
+
props: sectionProps,
|
|
255
|
+
mobileProps: Type.Optional(Type.Partial(sectionProps, { additionalProperties: false })),
|
|
256
|
+
bricks: Type.Array(brickSchema),
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
description: "Sections are direct children of the page that are stacked vertically.",
|
|
260
|
+
},
|
|
261
|
+
);
|
|
262
|
+
|
|
263
|
+
export const sectionSchemaNoBricks = Type.Omit(sectionSchema, ["bricks"]);
|
|
264
|
+
|
|
265
|
+
export function getSectionSchemaNoBrickForLLM() {
|
|
266
|
+
return toLLMSchema(sectionSchemaNoBricks);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export function getSectionSchemaForLLM() {
|
|
270
|
+
return toLLMSchema(sectionSchema);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
const sectionDefaultprops = getSchemaDefaults(sectionSchema.properties.props, "desktop") as Section["props"];
|
|
274
|
+
const sectionMobileDefaultprops = getSchemaDefaults(
|
|
275
|
+
sectionSchema.properties.mobileProps,
|
|
276
|
+
"mobile",
|
|
277
|
+
) as Section["mobileProps"];
|
|
278
|
+
|
|
279
|
+
export type Section = Static<typeof sectionSchema>;
|
|
280
|
+
|
|
281
|
+
export function processSections(
|
|
282
|
+
sections: Section[],
|
|
283
|
+
siteAttributes: SiteAttributes,
|
|
284
|
+
pageAttributes: PageAttributes,
|
|
285
|
+
): Section[] {
|
|
286
|
+
const processSection = (section: Section) => {
|
|
287
|
+
return {
|
|
288
|
+
...section,
|
|
289
|
+
props: mergeIgnoringArrays({} as Section["props"], sectionDefaultprops, section.props),
|
|
290
|
+
mobileProps: mergeIgnoringArrays({}, sectionMobileDefaultprops, section.mobileProps || {}),
|
|
291
|
+
bricks: section.bricks.map(processBrick).filter(Boolean) as Brick[],
|
|
292
|
+
} as const;
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
const finalSections = sections.map(processSection);
|
|
296
|
+
|
|
297
|
+
if (siteAttributes.navbar && !pageAttributes.noNavbar) {
|
|
298
|
+
finalSections.unshift(
|
|
299
|
+
processSection({
|
|
300
|
+
order: -1,
|
|
301
|
+
id: "navbar-section",
|
|
302
|
+
label: "Navbar section",
|
|
303
|
+
props: {
|
|
304
|
+
variant: "navbar",
|
|
305
|
+
direction: "flex-row",
|
|
306
|
+
},
|
|
307
|
+
mobileProps: {},
|
|
308
|
+
bricks: [
|
|
309
|
+
{
|
|
310
|
+
id: "navbar",
|
|
311
|
+
type: "navbar",
|
|
312
|
+
props: siteAttributes.navbar,
|
|
313
|
+
},
|
|
314
|
+
],
|
|
315
|
+
}),
|
|
316
|
+
);
|
|
317
|
+
}
|
|
318
|
+
if (siteAttributes.footer && !pageAttributes.noFooter) {
|
|
319
|
+
finalSections.push(
|
|
320
|
+
processSection({
|
|
321
|
+
order: 1000,
|
|
322
|
+
id: "footer-section",
|
|
323
|
+
label: "Footer section",
|
|
324
|
+
props: {
|
|
325
|
+
variant: "footer",
|
|
326
|
+
direction: "flex-row",
|
|
327
|
+
},
|
|
328
|
+
mobileProps: {},
|
|
329
|
+
bricks: [
|
|
330
|
+
{
|
|
331
|
+
id: "footer",
|
|
332
|
+
type: "footer",
|
|
333
|
+
props: siteAttributes.footer,
|
|
334
|
+
},
|
|
335
|
+
],
|
|
336
|
+
}),
|
|
337
|
+
);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
return finalSections satisfies Section[];
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* process a brick and add default props
|
|
345
|
+
*/
|
|
346
|
+
export function processBrick<T extends Brick>(brick: T): T {
|
|
347
|
+
const defProps = defaultProps[brick.type];
|
|
348
|
+
// if (!defProps) {
|
|
349
|
+
// console.warn(`No default props found for brick type: ${brick.type}`);
|
|
350
|
+
// return false; // or throw an error if you prefer
|
|
351
|
+
// }
|
|
352
|
+
const result = {
|
|
353
|
+
...brick,
|
|
354
|
+
props: mergeIgnoringArrays({} as Brick["props"], defProps.props, {
|
|
355
|
+
...brick.props,
|
|
356
|
+
...(brick.props.$children
|
|
357
|
+
? { $children: (brick.props.$children as T[]).map(processBrick).filter(Boolean) }
|
|
358
|
+
: {}),
|
|
359
|
+
}),
|
|
360
|
+
};
|
|
361
|
+
return result;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
export function createEmptyBrick(type: string, ghost = false): Brick {
|
|
365
|
+
const props = { ...defaultProps[type].props, ghost };
|
|
366
|
+
const newBrick = {
|
|
367
|
+
id: `b-${generateId()}`,
|
|
368
|
+
type,
|
|
369
|
+
props,
|
|
370
|
+
};
|
|
371
|
+
return newBrick;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export const sectionsExamples: { label: string; description: string; example: Section }[] = [
|
|
375
|
+
{
|
|
376
|
+
label: "Hero section with centered 'hero' and 'button' bricks",
|
|
377
|
+
description: `A simple hero section with a title and a light primary background.
|
|
378
|
+
The "hero" brick does not have a colorPreset so it is transparent and inherits the background/text-color settings from the section.
|
|
379
|
+
Bricks are centered both vertically and horizontally using justifyContent and alignItems.
|
|
380
|
+
Bricks are stacked vertically using the "direction" set to "flex-col".
|
|
381
|
+
`,
|
|
382
|
+
example: {
|
|
383
|
+
id: "hero-section",
|
|
384
|
+
order: 0,
|
|
385
|
+
props: {
|
|
386
|
+
colorPreset: { color: "primary-100" },
|
|
387
|
+
direction: "flex-col",
|
|
388
|
+
padding: "6rem",
|
|
389
|
+
gap: "3rem",
|
|
390
|
+
justifyContent: "justify-center",
|
|
391
|
+
alignItems: "items-center",
|
|
392
|
+
},
|
|
393
|
+
bricks: [
|
|
394
|
+
{
|
|
395
|
+
id: "hero",
|
|
396
|
+
type: "hero",
|
|
397
|
+
props: {
|
|
398
|
+
content: "<h1 style='text-align:center'>Welcome to my SaaS</h1>",
|
|
399
|
+
tagline: "The future of productivity starts here",
|
|
400
|
+
},
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
id: "cta-button",
|
|
404
|
+
type: "button",
|
|
405
|
+
props: {
|
|
406
|
+
label: "Get Started",
|
|
407
|
+
href: "/signup",
|
|
408
|
+
colorPreset: { color: "primary-500", variant: "solid" },
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
],
|
|
412
|
+
},
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
label: "Contact section with a text and a form",
|
|
416
|
+
description: `A contact section with a title and a form.
|
|
417
|
+
The section has a light gray background using a colorPreset.
|
|
418
|
+
Bricks are stacked vertically using the "direction" set to "flex-col".
|
|
419
|
+
`,
|
|
420
|
+
example: {
|
|
421
|
+
id: "contact-section",
|
|
422
|
+
order: 1,
|
|
423
|
+
props: {
|
|
424
|
+
colorPreset: { color: "gray-100" },
|
|
425
|
+
direction: "flex-col",
|
|
426
|
+
padding: "4rem",
|
|
427
|
+
gap: "2rem",
|
|
428
|
+
justifyContent: "justify-center",
|
|
429
|
+
alignItems: "items-center",
|
|
430
|
+
},
|
|
431
|
+
bricks: [
|
|
432
|
+
{
|
|
433
|
+
id: "contact-title",
|
|
434
|
+
type: "text",
|
|
435
|
+
props: {
|
|
436
|
+
content: "<h2>Get in Touch</h2>",
|
|
437
|
+
},
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
id: "contact-form",
|
|
441
|
+
type: "form",
|
|
442
|
+
props: {
|
|
443
|
+
title: "Contact Us",
|
|
444
|
+
fields: [
|
|
445
|
+
{ name: "name", label: "Name", type: "text", required: true },
|
|
446
|
+
{ name: "email", label: "Email", type: "email", required: true },
|
|
447
|
+
{ name: "message", label: "Message", type: "textarea", required: true },
|
|
448
|
+
],
|
|
449
|
+
},
|
|
450
|
+
},
|
|
451
|
+
],
|
|
452
|
+
},
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
label: "Feature showcase with horizontal layout and container brick",
|
|
456
|
+
description: `A features section using horizontal layout with a container "box" brick that holds multiple feature items.
|
|
457
|
+
The box brick is the only container type that can hold $children (other bricks).
|
|
458
|
+
This demonstrates nested brick structure where the box contains multiple feature bricks.`,
|
|
459
|
+
example: {
|
|
460
|
+
id: "features-section",
|
|
461
|
+
order: 2,
|
|
462
|
+
props: {
|
|
463
|
+
direction: "flex-col",
|
|
464
|
+
padding: "5rem",
|
|
465
|
+
gap: "3rem",
|
|
466
|
+
maxWidth: "max-w-screen-xl",
|
|
467
|
+
justifyContent: "justify-center",
|
|
468
|
+
alignItems: "items-center",
|
|
469
|
+
},
|
|
470
|
+
bricks: [
|
|
471
|
+
{
|
|
472
|
+
id: "features-title",
|
|
473
|
+
type: "text",
|
|
474
|
+
props: {
|
|
475
|
+
content: "<h2 style='text-align:center'>Our Features</h2>",
|
|
476
|
+
},
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
id: "features-container",
|
|
480
|
+
type: "box",
|
|
481
|
+
props: {
|
|
482
|
+
direction: "flex-row",
|
|
483
|
+
gap: "2rem",
|
|
484
|
+
padding: "2rem",
|
|
485
|
+
$children: [
|
|
486
|
+
{
|
|
487
|
+
id: "feature-1",
|
|
488
|
+
type: "text",
|
|
489
|
+
props: {
|
|
490
|
+
content: "<h3>Fast</h3><p>Lightning-fast performance for your needs.</p>",
|
|
491
|
+
colorPreset: { color: "blue-500" },
|
|
492
|
+
},
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
id: "feature-2",
|
|
496
|
+
type: "text",
|
|
497
|
+
props: {
|
|
498
|
+
content: "<h3>Secure</h3><p>Enterprise-grade security built-in.</p>",
|
|
499
|
+
colorPreset: { color: "green-500" },
|
|
500
|
+
},
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
id: "feature-3",
|
|
504
|
+
type: "text",
|
|
505
|
+
props: {
|
|
506
|
+
content: "<h3>Scalable</h3><p>Grows with your business seamlessly.</p>",
|
|
507
|
+
colorPreset: { color: "purple-500" },
|
|
508
|
+
},
|
|
509
|
+
},
|
|
510
|
+
],
|
|
511
|
+
},
|
|
512
|
+
},
|
|
513
|
+
],
|
|
514
|
+
},
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
label: "Media-rich section with image and text side by side",
|
|
518
|
+
description: `A content section using horizontal layout to place an image next to text content.
|
|
519
|
+
Demonstrates how direction "flex-row" arranges bricks horizontally.
|
|
520
|
+
The section uses responsive mobile overrides to stack vertically on mobile.`,
|
|
521
|
+
example: {
|
|
522
|
+
id: "about-section",
|
|
523
|
+
order: 3,
|
|
524
|
+
props: {
|
|
525
|
+
direction: "flex-row",
|
|
526
|
+
padding: "4rem",
|
|
527
|
+
gap: "3rem",
|
|
528
|
+
alignItems: "items-center",
|
|
529
|
+
maxWidth: "max-w-screen-xl",
|
|
530
|
+
},
|
|
531
|
+
mobileProps: {
|
|
532
|
+
direction: "flex-col",
|
|
533
|
+
padding: "2rem",
|
|
534
|
+
},
|
|
535
|
+
bricks: [
|
|
536
|
+
{
|
|
537
|
+
id: "about-image",
|
|
538
|
+
type: "image",
|
|
539
|
+
props: {
|
|
540
|
+
src: "https://example.com/about-image.jpg",
|
|
541
|
+
alt: "About our company",
|
|
542
|
+
width: "400px",
|
|
543
|
+
height: "300px",
|
|
544
|
+
},
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
id: "about-text",
|
|
548
|
+
type: "text",
|
|
549
|
+
props: {
|
|
550
|
+
content:
|
|
551
|
+
"<h2>About Us</h2><p>We are a leading company in innovative solutions, dedicated to transforming how businesses operate in the digital age.</p>",
|
|
552
|
+
},
|
|
553
|
+
},
|
|
554
|
+
],
|
|
555
|
+
},
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
label: "Complex nested layout with multiple container levels",
|
|
559
|
+
description: `Advanced example showing deeply nested brick structure using multiple box containers.
|
|
560
|
+
Demonstrates how box bricks can contain other box bricks, creating sophisticated layouts.
|
|
561
|
+
Shows responsive design with different mobile arrangements.`,
|
|
562
|
+
example: {
|
|
563
|
+
id: "complex-layout-section",
|
|
564
|
+
order: 4,
|
|
565
|
+
props: {
|
|
566
|
+
direction: "flex-col",
|
|
567
|
+
padding: "4rem",
|
|
568
|
+
gap: "2rem",
|
|
569
|
+
backgroundImage: { image: "https://example.com/bg.jpg" },
|
|
570
|
+
},
|
|
571
|
+
bricks: [
|
|
572
|
+
{
|
|
573
|
+
id: "main-container",
|
|
574
|
+
type: "box",
|
|
575
|
+
props: {
|
|
576
|
+
direction: "flex-row",
|
|
577
|
+
gap: "2rem",
|
|
578
|
+
padding: "2rem",
|
|
579
|
+
$children: [
|
|
580
|
+
{
|
|
581
|
+
id: "left-column",
|
|
582
|
+
type: "box",
|
|
583
|
+
props: {
|
|
584
|
+
direction: "flex-col",
|
|
585
|
+
gap: "1rem",
|
|
586
|
+
colorPreset: { color: "gray-50" },
|
|
587
|
+
padding: "1.5rem",
|
|
588
|
+
$children: [
|
|
589
|
+
{
|
|
590
|
+
id: "left-title",
|
|
591
|
+
type: "text",
|
|
592
|
+
props: {
|
|
593
|
+
content: "<h3>Left Column</h3>",
|
|
594
|
+
},
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
id: "left-button",
|
|
598
|
+
type: "button",
|
|
599
|
+
props: {
|
|
600
|
+
label: "Learn More",
|
|
601
|
+
href: "/learn",
|
|
602
|
+
colorPreset: { color: "blue-500", variant: "outline" },
|
|
603
|
+
},
|
|
604
|
+
},
|
|
605
|
+
],
|
|
606
|
+
},
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
id: "right-column",
|
|
610
|
+
type: "box",
|
|
611
|
+
props: {
|
|
612
|
+
direction: "flex-col",
|
|
613
|
+
gap: "1rem",
|
|
614
|
+
colorPreset: { color: "blue-50" },
|
|
615
|
+
padding: "1.5rem",
|
|
616
|
+
$children: [
|
|
617
|
+
{
|
|
618
|
+
id: "right-image",
|
|
619
|
+
type: "image",
|
|
620
|
+
props: {
|
|
621
|
+
src: "https://example.com/feature.jpg",
|
|
622
|
+
alt: "Feature showcase",
|
|
623
|
+
width: "100%",
|
|
624
|
+
},
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
id: "right-text",
|
|
628
|
+
type: "text",
|
|
629
|
+
props: {
|
|
630
|
+
content: "<p>Detailed description of our amazing features and capabilities.</p>",
|
|
631
|
+
},
|
|
632
|
+
},
|
|
633
|
+
],
|
|
634
|
+
},
|
|
635
|
+
},
|
|
636
|
+
],
|
|
637
|
+
mobileProps: {
|
|
638
|
+
direction: "flex-col",
|
|
639
|
+
},
|
|
640
|
+
},
|
|
641
|
+
},
|
|
642
|
+
],
|
|
643
|
+
},
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
label: "Footer-style section with multiple columns",
|
|
647
|
+
description: `A footer-like section demonstrating horizontal layout with multiple informational columns.
|
|
648
|
+
Uses the footer variant for special styling and contains multiple text bricks arranged horizontally.
|
|
649
|
+
Shows how to create multi-column layouts using direction and gap properties.`,
|
|
650
|
+
example: {
|
|
651
|
+
id: "info-footer-section",
|
|
652
|
+
order: 5,
|
|
653
|
+
props: {
|
|
654
|
+
variant: "footer",
|
|
655
|
+
direction: "flex-row",
|
|
656
|
+
padding: "3rem",
|
|
657
|
+
gap: "4rem",
|
|
658
|
+
colorPreset: { color: "gray-800" },
|
|
659
|
+
justifyContent: "justify-center",
|
|
660
|
+
},
|
|
661
|
+
mobileProps: {
|
|
662
|
+
direction: "flex-col",
|
|
663
|
+
gap: "2rem",
|
|
664
|
+
},
|
|
665
|
+
bricks: [
|
|
666
|
+
{
|
|
667
|
+
id: "company-info",
|
|
668
|
+
type: "text",
|
|
669
|
+
props: {
|
|
670
|
+
content:
|
|
671
|
+
"<h4 style='color:white'>Company</h4><p style='color:gray'>About Us<br>Careers<br>Contact</p>",
|
|
672
|
+
},
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
id: "product-info",
|
|
676
|
+
type: "text",
|
|
677
|
+
props: {
|
|
678
|
+
content:
|
|
679
|
+
"<h4 style='color:white'>Product</h4><p style='color:gray'>Features<br>Pricing<br>Documentation</p>",
|
|
680
|
+
},
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
id: "support-info",
|
|
684
|
+
type: "text",
|
|
685
|
+
props: {
|
|
686
|
+
content:
|
|
687
|
+
"<h4 style='color:white'>Support</h4><p style='color:gray'>Help Center<br>Community<br>Status</p>",
|
|
688
|
+
},
|
|
689
|
+
},
|
|
690
|
+
],
|
|
691
|
+
},
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
label: "Video showcase section with title and description",
|
|
695
|
+
description: `A media section featuring a YouTube video with accompanying text.
|
|
696
|
+
Shows how to use video bricks for multimedia content.
|
|
697
|
+
The section uses a light background to make the video stand out.`,
|
|
698
|
+
example: {
|
|
699
|
+
id: "video-showcase-section",
|
|
700
|
+
order: 6,
|
|
701
|
+
props: {
|
|
702
|
+
direction: "flex-col",
|
|
703
|
+
padding: "4rem",
|
|
704
|
+
gap: "2rem",
|
|
705
|
+
colorPreset: { color: "gray-50" },
|
|
706
|
+
alignItems: "items-center",
|
|
707
|
+
maxWidth: "max-w-screen-lg",
|
|
708
|
+
},
|
|
709
|
+
bricks: [
|
|
710
|
+
{
|
|
711
|
+
id: "video-title",
|
|
712
|
+
type: "text",
|
|
713
|
+
props: {
|
|
714
|
+
content: "<h2 style='text-align:center'>Watch Our Demo</h2>",
|
|
715
|
+
},
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
id: "demo-video",
|
|
719
|
+
type: "video",
|
|
720
|
+
props: {
|
|
721
|
+
url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
|
|
722
|
+
title: "Product Demo Video",
|
|
723
|
+
},
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
id: "video-description",
|
|
727
|
+
type: "text",
|
|
728
|
+
props: {
|
|
729
|
+
content:
|
|
730
|
+
"<p style='text-align:center'>See how our platform can transform your workflow in just 2 minutes.</p>",
|
|
731
|
+
},
|
|
732
|
+
},
|
|
733
|
+
],
|
|
734
|
+
},
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
label: "Image gallery section with carousel",
|
|
738
|
+
description: `A media-rich section showcasing an image carousel.
|
|
739
|
+
Demonstrates how to use carousel bricks for displaying multiple images.
|
|
740
|
+
Perfect for portfolios, product showcases, or photo galleries.`,
|
|
741
|
+
example: {
|
|
742
|
+
id: "gallery-section",
|
|
743
|
+
order: 7,
|
|
744
|
+
props: {
|
|
745
|
+
direction: "flex-col",
|
|
746
|
+
padding: "4rem",
|
|
747
|
+
gap: "2rem",
|
|
748
|
+
alignItems: "items-center",
|
|
749
|
+
},
|
|
750
|
+
bricks: [
|
|
751
|
+
{
|
|
752
|
+
id: "gallery-title",
|
|
753
|
+
type: "text",
|
|
754
|
+
props: {
|
|
755
|
+
content: "<h2 style='text-align:center'>Our Portfolio</h2>",
|
|
756
|
+
},
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
id: "portfolio-carousel",
|
|
760
|
+
type: "carousel",
|
|
761
|
+
props: {
|
|
762
|
+
images: [
|
|
763
|
+
{ src: "https://example.com/project1.jpg", alt: "Project 1" },
|
|
764
|
+
{ src: "https://example.com/project2.jpg", alt: "Project 2" },
|
|
765
|
+
{ src: "https://example.com/project3.jpg", alt: "Project 3" },
|
|
766
|
+
],
|
|
767
|
+
autoplay: true,
|
|
768
|
+
showDots: true,
|
|
769
|
+
},
|
|
770
|
+
},
|
|
771
|
+
],
|
|
772
|
+
},
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
label: "Interactive form section with styled inputs",
|
|
776
|
+
description: `A comprehensive form section for user registration or contact.
|
|
777
|
+
Shows how to create forms with various field types and validation.
|
|
778
|
+
Uses a card-like appearance with rounded corners and shadow.`,
|
|
779
|
+
example: {
|
|
780
|
+
id: "signup-form-section",
|
|
781
|
+
order: 8,
|
|
782
|
+
props: {
|
|
783
|
+
direction: "flex-col",
|
|
784
|
+
padding: "4rem",
|
|
785
|
+
gap: "2rem",
|
|
786
|
+
colorPreset: { color: "blue-50" },
|
|
787
|
+
alignItems: "items-center",
|
|
788
|
+
maxWidth: "max-w-screen-md",
|
|
789
|
+
},
|
|
790
|
+
bricks: [
|
|
791
|
+
{
|
|
792
|
+
id: "form-header",
|
|
793
|
+
type: "text",
|
|
794
|
+
props: {
|
|
795
|
+
content:
|
|
796
|
+
"<h2 style='text-align:center'>Join Our Platform</h2><p style='text-align:center'>Create your account and start building today.</p>",
|
|
797
|
+
},
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
id: "registration-form",
|
|
801
|
+
type: "form",
|
|
802
|
+
props: {
|
|
803
|
+
title: "Sign Up",
|
|
804
|
+
submitLabel: "Create Account",
|
|
805
|
+
fields: [
|
|
806
|
+
{ name: "firstName", label: "First Name", type: "text", required: true },
|
|
807
|
+
{ name: "lastName", label: "Last Name", type: "text", required: true },
|
|
808
|
+
{ name: "email", label: "Email Address", type: "email", required: true },
|
|
809
|
+
{ name: "password", label: "Password", type: "password", required: true },
|
|
810
|
+
{ name: "company", label: "Company", type: "text", required: false },
|
|
811
|
+
{ name: "newsletter", label: "Subscribe to newsletter", type: "checkbox", required: false },
|
|
812
|
+
],
|
|
813
|
+
colorPreset: { color: "white" },
|
|
814
|
+
shadow: "shadow-lg",
|
|
815
|
+
rounding: "rounded-lg",
|
|
816
|
+
padding: "2rem",
|
|
817
|
+
},
|
|
818
|
+
},
|
|
819
|
+
],
|
|
820
|
+
},
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
label: "Testimonials section with customer feedback",
|
|
824
|
+
description: `A social proof section using the testimonials brick to display customer feedback.
|
|
825
|
+
Shows how to structure testimonials with avatars, company information, and social icons.
|
|
826
|
+
Perfect for building trust and credibility with potential customers.`,
|
|
827
|
+
example: {
|
|
828
|
+
id: "testimonials-section",
|
|
829
|
+
order: 9,
|
|
830
|
+
props: {
|
|
831
|
+
direction: "flex-col",
|
|
832
|
+
padding: "5rem",
|
|
833
|
+
gap: "3rem",
|
|
834
|
+
colorPreset: { color: "purple-50" },
|
|
835
|
+
alignItems: "items-center",
|
|
836
|
+
},
|
|
837
|
+
bricks: [
|
|
838
|
+
{
|
|
839
|
+
id: "testimonials-title",
|
|
840
|
+
type: "text",
|
|
841
|
+
props: {
|
|
842
|
+
content: "<h2 style='text-align:center'>What Our Customers Say</h2>",
|
|
843
|
+
},
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
id: "customer-testimonials",
|
|
847
|
+
type: "testimonials",
|
|
848
|
+
props: {
|
|
849
|
+
testimonials: [
|
|
850
|
+
{
|
|
851
|
+
text: "This platform has completely transformed how we handle our projects. The automation features and intuitive interface have saved us countless hours every week.",
|
|
852
|
+
author: "Sarah Johnson",
|
|
853
|
+
company: "TechCorp Solutions",
|
|
854
|
+
avatar: {
|
|
855
|
+
src: "https://via.placeholder.com/80x80.png?text=SJ",
|
|
856
|
+
alt: "Sarah Johnson profile photo",
|
|
857
|
+
},
|
|
858
|
+
socialIcon: "mdi:linkedin",
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
text: "Outstanding customer support and regular feature updates. We've been using this for over a year and it keeps getting better. Highly recommend!",
|
|
862
|
+
author: "Mike Chen",
|
|
863
|
+
company: "StartupFlow",
|
|
864
|
+
avatar: {
|
|
865
|
+
src: "https://via.placeholder.com/80x80.png?text=MC",
|
|
866
|
+
alt: "Mike Chen profile photo",
|
|
867
|
+
},
|
|
868
|
+
socialIcon: "mdi:twitter",
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
text: "The results speak for themselves - our productivity increased by 40% after implementing this solution. It's like having an extra team member.",
|
|
872
|
+
author: "Emily Rodriguez",
|
|
873
|
+
company: "Digital Agency Pro",
|
|
874
|
+
avatar: {
|
|
875
|
+
src: "https://via.placeholder.com/80x80.png?text=ER",
|
|
876
|
+
alt: "Emily Rodriguez profile photo",
|
|
877
|
+
},
|
|
878
|
+
socialIcon: "mdi:briefcase",
|
|
879
|
+
},
|
|
880
|
+
],
|
|
881
|
+
colorPreset: { color: "white" },
|
|
882
|
+
shadow: "shadow-lg",
|
|
883
|
+
padding: "2rem",
|
|
884
|
+
gap: "2rem",
|
|
885
|
+
},
|
|
886
|
+
},
|
|
887
|
+
],
|
|
888
|
+
},
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
label: "Location and contact information with map",
|
|
892
|
+
description: `A contact section featuring an interactive map alongside contact details.
|
|
893
|
+
Shows how to combine map bricks with text and contact information.
|
|
894
|
+
Perfect for businesses with physical locations.`,
|
|
895
|
+
example: {
|
|
896
|
+
id: "location-section",
|
|
897
|
+
order: 10,
|
|
898
|
+
props: {
|
|
899
|
+
direction: "flex-row",
|
|
900
|
+
padding: "4rem",
|
|
901
|
+
gap: "3rem",
|
|
902
|
+
alignItems: "items-start",
|
|
903
|
+
},
|
|
904
|
+
mobileProps: {
|
|
905
|
+
direction: "flex-col",
|
|
906
|
+
},
|
|
907
|
+
bricks: [
|
|
908
|
+
{
|
|
909
|
+
id: "contact-details",
|
|
910
|
+
type: "box",
|
|
911
|
+
props: {
|
|
912
|
+
direction: "flex-col",
|
|
913
|
+
gap: "2rem",
|
|
914
|
+
padding: "2rem",
|
|
915
|
+
colorPreset: { color: "gray-50" },
|
|
916
|
+
rounding: "rounded-lg",
|
|
917
|
+
$children: [
|
|
918
|
+
{
|
|
919
|
+
id: "office-title",
|
|
920
|
+
type: "text",
|
|
921
|
+
props: {
|
|
922
|
+
content: "<h3>Visit Our Office</h3>",
|
|
923
|
+
},
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
id: "address",
|
|
927
|
+
type: "text",
|
|
928
|
+
props: {
|
|
929
|
+
content:
|
|
930
|
+
"<p><strong>Address:</strong><br>123 Business Street<br>Suite 100<br>San Francisco, CA 94105</p>",
|
|
931
|
+
},
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
id: "contact-info",
|
|
935
|
+
type: "text",
|
|
936
|
+
props: {
|
|
937
|
+
content:
|
|
938
|
+
"<p><strong>Phone:</strong> +1 (555) 123-4567<br><strong>Email:</strong> hello@company.com</p>",
|
|
939
|
+
},
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
id: "hours",
|
|
943
|
+
type: "text",
|
|
944
|
+
props: {
|
|
945
|
+
content:
|
|
946
|
+
"<p><strong>Business Hours:</strong><br>Monday - Friday: 9:00 AM - 6:00 PM<br>Saturday: 10:00 AM - 4:00 PM</p>",
|
|
947
|
+
},
|
|
948
|
+
},
|
|
949
|
+
],
|
|
950
|
+
},
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
id: "office-map",
|
|
954
|
+
type: "map",
|
|
955
|
+
props: {
|
|
956
|
+
address: "123 Business Street, San Francisco, CA 94105",
|
|
957
|
+
zoom: 15,
|
|
958
|
+
height: "400px",
|
|
959
|
+
},
|
|
960
|
+
},
|
|
961
|
+
],
|
|
962
|
+
},
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
label: "Statistics showcase with icons and numbers",
|
|
966
|
+
description: `A metrics section displaying key statistics using icon and text bricks.
|
|
967
|
+
Demonstrates how to create compelling data visualizations.
|
|
968
|
+
Uses horizontal layout with consistent spacing and visual hierarchy.`,
|
|
969
|
+
example: {
|
|
970
|
+
id: "stats-section",
|
|
971
|
+
order: 11,
|
|
972
|
+
props: {
|
|
973
|
+
direction: "flex-col",
|
|
974
|
+
padding: "5rem",
|
|
975
|
+
gap: "3rem",
|
|
976
|
+
colorPreset: { color: "gradient", gradientDirection: "bg-gradient-to-r" },
|
|
977
|
+
alignItems: "items-center",
|
|
978
|
+
},
|
|
979
|
+
bricks: [
|
|
980
|
+
{
|
|
981
|
+
id: "stats-title",
|
|
982
|
+
type: "text",
|
|
983
|
+
props: {
|
|
984
|
+
content: "<h2 style='text-align:center; color:white'>Our Impact</h2>",
|
|
985
|
+
},
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
id: "stats-container",
|
|
989
|
+
type: "box",
|
|
990
|
+
props: {
|
|
991
|
+
direction: "flex-row",
|
|
992
|
+
gap: "4rem",
|
|
993
|
+
justifyContent: "justify-center",
|
|
994
|
+
$children: [
|
|
995
|
+
{
|
|
996
|
+
id: "users-stat",
|
|
997
|
+
type: "box",
|
|
998
|
+
props: {
|
|
999
|
+
direction: "flex-col",
|
|
1000
|
+
gap: "1rem",
|
|
1001
|
+
alignItems: "items-center",
|
|
1002
|
+
$children: [
|
|
1003
|
+
{
|
|
1004
|
+
id: "users-icon",
|
|
1005
|
+
type: "icon",
|
|
1006
|
+
props: {
|
|
1007
|
+
icon: "users",
|
|
1008
|
+
size: "3rem",
|
|
1009
|
+
color: "white",
|
|
1010
|
+
},
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
id: "users-number",
|
|
1014
|
+
type: "text",
|
|
1015
|
+
props: {
|
|
1016
|
+
content:
|
|
1017
|
+
"<h3 style='color:white; text-align:center'>50K+</h3><p style='color:white; text-align:center'>Active Users</p>",
|
|
1018
|
+
},
|
|
1019
|
+
},
|
|
1020
|
+
],
|
|
1021
|
+
},
|
|
1022
|
+
},
|
|
1023
|
+
{
|
|
1024
|
+
id: "projects-stat",
|
|
1025
|
+
type: "box",
|
|
1026
|
+
props: {
|
|
1027
|
+
direction: "flex-col",
|
|
1028
|
+
gap: "1rem",
|
|
1029
|
+
alignItems: "items-center",
|
|
1030
|
+
$children: [
|
|
1031
|
+
{
|
|
1032
|
+
id: "projects-icon",
|
|
1033
|
+
type: "icon",
|
|
1034
|
+
props: {
|
|
1035
|
+
icon: "briefcase",
|
|
1036
|
+
size: "3rem",
|
|
1037
|
+
color: "white",
|
|
1038
|
+
},
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
id: "projects-number",
|
|
1042
|
+
type: "text",
|
|
1043
|
+
props: {
|
|
1044
|
+
content:
|
|
1045
|
+
"<h3 style='color:white; text-align:center'>100K+</h3><p style='color:white; text-align:center'>Projects Created</p>",
|
|
1046
|
+
},
|
|
1047
|
+
},
|
|
1048
|
+
],
|
|
1049
|
+
},
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
id: "satisfaction-stat",
|
|
1053
|
+
type: "box",
|
|
1054
|
+
props: {
|
|
1055
|
+
direction: "flex-col",
|
|
1056
|
+
gap: "1rem",
|
|
1057
|
+
alignItems: "items-center",
|
|
1058
|
+
$children: [
|
|
1059
|
+
{
|
|
1060
|
+
id: "satisfaction-icon",
|
|
1061
|
+
type: "icon",
|
|
1062
|
+
props: {
|
|
1063
|
+
icon: "star",
|
|
1064
|
+
size: "3rem",
|
|
1065
|
+
color: "white",
|
|
1066
|
+
},
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
id: "satisfaction-number",
|
|
1070
|
+
type: "text",
|
|
1071
|
+
props: {
|
|
1072
|
+
content:
|
|
1073
|
+
"<h3 style='color:white; text-align:center'>98%</h3><p style='color:white; text-align:center'>Satisfaction Rate</p>",
|
|
1074
|
+
},
|
|
1075
|
+
},
|
|
1076
|
+
],
|
|
1077
|
+
},
|
|
1078
|
+
},
|
|
1079
|
+
],
|
|
1080
|
+
mobileProps: {
|
|
1081
|
+
direction: "flex-col",
|
|
1082
|
+
gap: "2rem",
|
|
1083
|
+
},
|
|
1084
|
+
},
|
|
1085
|
+
},
|
|
1086
|
+
],
|
|
1087
|
+
},
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
label: "Social links and newsletter signup",
|
|
1091
|
+
description: `A community engagement section combining social media links with newsletter signup.
|
|
1092
|
+
Shows how to use social-links bricks and forms together.
|
|
1093
|
+
Creates a cohesive call-to-action for community building.`,
|
|
1094
|
+
example: {
|
|
1095
|
+
id: "community-section",
|
|
1096
|
+
order: 12,
|
|
1097
|
+
props: {
|
|
1098
|
+
direction: "flex-col",
|
|
1099
|
+
padding: "4rem",
|
|
1100
|
+
gap: "3rem",
|
|
1101
|
+
colorPreset: { color: "indigo-100" },
|
|
1102
|
+
alignItems: "items-center",
|
|
1103
|
+
maxWidth: "max-w-screen-md",
|
|
1104
|
+
},
|
|
1105
|
+
bricks: [
|
|
1106
|
+
{
|
|
1107
|
+
id: "community-title",
|
|
1108
|
+
type: "text",
|
|
1109
|
+
props: {
|
|
1110
|
+
content:
|
|
1111
|
+
"<h2 style='text-align:center'>Stay Connected</h2><p style='text-align:center'>Join our community and never miss an update.</p>",
|
|
1112
|
+
},
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
id: "social-links",
|
|
1116
|
+
type: "social-links",
|
|
1117
|
+
props: {
|
|
1118
|
+
links: [
|
|
1119
|
+
{ platform: "twitter", url: "https://twitter.com/company" },
|
|
1120
|
+
{ platform: "linkedin", url: "https://linkedin.com/company/company" },
|
|
1121
|
+
{ platform: "github", url: "https://github.com/company" },
|
|
1122
|
+
{ platform: "youtube", url: "https://youtube.com/company" },
|
|
1123
|
+
],
|
|
1124
|
+
size: "large",
|
|
1125
|
+
style: "filled",
|
|
1126
|
+
},
|
|
1127
|
+
},
|
|
1128
|
+
{
|
|
1129
|
+
id: "newsletter-form",
|
|
1130
|
+
type: "form",
|
|
1131
|
+
props: {
|
|
1132
|
+
title: "Subscribe to Our Newsletter",
|
|
1133
|
+
subtitle: "Get weekly updates and exclusive content delivered to your inbox.",
|
|
1134
|
+
submitLabel: "Subscribe",
|
|
1135
|
+
fields: [
|
|
1136
|
+
{
|
|
1137
|
+
name: "email",
|
|
1138
|
+
label: "Email Address",
|
|
1139
|
+
type: "email",
|
|
1140
|
+
required: true,
|
|
1141
|
+
placeholder: "your@email.com",
|
|
1142
|
+
},
|
|
1143
|
+
],
|
|
1144
|
+
colorPreset: { color: "white" },
|
|
1145
|
+
rounding: "rounded-lg",
|
|
1146
|
+
padding: "2rem",
|
|
1147
|
+
shadow: "shadow-md",
|
|
1148
|
+
},
|
|
1149
|
+
},
|
|
1150
|
+
],
|
|
1151
|
+
},
|
|
1152
|
+
},
|
|
1153
|
+
{
|
|
1154
|
+
label: "Pricing table with multiple options",
|
|
1155
|
+
description: `A pricing section using card bricks to create a comparison table.
|
|
1156
|
+
Demonstrates how to structure pricing tiers with different features.
|
|
1157
|
+
Uses consistent styling with highlighted premium option.`,
|
|
1158
|
+
example: {
|
|
1159
|
+
id: "pricing-section",
|
|
1160
|
+
order: 13,
|
|
1161
|
+
props: {
|
|
1162
|
+
direction: "flex-col",
|
|
1163
|
+
padding: "5rem",
|
|
1164
|
+
gap: "3rem",
|
|
1165
|
+
alignItems: "items-center",
|
|
1166
|
+
},
|
|
1167
|
+
bricks: [
|
|
1168
|
+
{
|
|
1169
|
+
id: "pricing-header",
|
|
1170
|
+
type: "text",
|
|
1171
|
+
props: {
|
|
1172
|
+
content:
|
|
1173
|
+
"<h2 style='text-align:center'>Choose Your Plan</h2><p style='text-align:center'>Select the perfect plan for your needs.</p>",
|
|
1174
|
+
},
|
|
1175
|
+
},
|
|
1176
|
+
{
|
|
1177
|
+
id: "pricing-cards",
|
|
1178
|
+
type: "box",
|
|
1179
|
+
props: {
|
|
1180
|
+
direction: "flex-row",
|
|
1181
|
+
gap: "2rem",
|
|
1182
|
+
justifyContent: "justify-center",
|
|
1183
|
+
$children: [
|
|
1184
|
+
{
|
|
1185
|
+
id: "basic-plan",
|
|
1186
|
+
type: "card",
|
|
1187
|
+
props: {
|
|
1188
|
+
title: "Basic",
|
|
1189
|
+
subtitle: "$9/month",
|
|
1190
|
+
content: "• 5 Projects<br>• 10GB Storage<br>• Email Support<br>• Basic Templates",
|
|
1191
|
+
colorPreset: { color: "white" },
|
|
1192
|
+
border: { width: "border-2", color: "border-gray-200" },
|
|
1193
|
+
rounding: "rounded-lg",
|
|
1194
|
+
padding: "2rem",
|
|
1195
|
+
shadow: "shadow-md",
|
|
1196
|
+
},
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
id: "pro-plan",
|
|
1200
|
+
type: "card",
|
|
1201
|
+
props: {
|
|
1202
|
+
title: "Pro",
|
|
1203
|
+
subtitle: "$29/month",
|
|
1204
|
+
content:
|
|
1205
|
+
"• Unlimited Projects<br>• 100GB Storage<br>• Priority Support<br>• Premium Templates<br>• Advanced Analytics",
|
|
1206
|
+
colorPreset: { color: "blue-500" },
|
|
1207
|
+
rounding: "rounded-lg",
|
|
1208
|
+
padding: "2rem",
|
|
1209
|
+
shadow: "shadow-lg",
|
|
1210
|
+
border: { width: "border-2", color: "border-blue-400" },
|
|
1211
|
+
},
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
id: "enterprise-plan",
|
|
1215
|
+
type: "card",
|
|
1216
|
+
props: {
|
|
1217
|
+
title: "Enterprise",
|
|
1218
|
+
subtitle: "Custom",
|
|
1219
|
+
content:
|
|
1220
|
+
"• Everything in Pro<br>• Unlimited Storage<br>• 24/7 Phone Support<br>• Custom Integrations<br>• Dedicated Account Manager",
|
|
1221
|
+
colorPreset: { color: "white" },
|
|
1222
|
+
border: { width: "border-2", color: "border-gray-200" },
|
|
1223
|
+
rounding: "rounded-lg",
|
|
1224
|
+
padding: "2rem",
|
|
1225
|
+
shadow: "shadow-md",
|
|
1226
|
+
},
|
|
1227
|
+
},
|
|
1228
|
+
],
|
|
1229
|
+
mobileProps: {
|
|
1230
|
+
direction: "flex-col",
|
|
1231
|
+
},
|
|
1232
|
+
},
|
|
1233
|
+
},
|
|
1234
|
+
],
|
|
1235
|
+
},
|
|
1236
|
+
},
|
|
1237
|
+
];
|