@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,245 @@
|
|
|
1
|
+
import { defineBrickManifest } from "~/shared/brick-manifest";
|
|
2
|
+
import { textContentRef } from "../props/text";
|
|
3
|
+
import { defineProps } from "../props/helpers";
|
|
4
|
+
import { borderRef, roundingRef } from "../props/border";
|
|
5
|
+
import { RxTextAlignLeft } from "react-icons/rx";
|
|
6
|
+
import type { BrickProps } from "../props/types";
|
|
7
|
+
import { Type } from "@sinclair/typebox";
|
|
8
|
+
import { alignItemsRef } from "../props/align";
|
|
9
|
+
import { shadowRef } from "../props/effects";
|
|
10
|
+
import { colorPresetRef } from "../props/color-preset";
|
|
11
|
+
import { loopRef } from "../props/dynamic";
|
|
12
|
+
import { cssLengthRef } from "../props/css-length";
|
|
13
|
+
|
|
14
|
+
export const manifest = defineBrickManifest({
|
|
15
|
+
type: "text",
|
|
16
|
+
category: "basic",
|
|
17
|
+
name: "Text",
|
|
18
|
+
description: "Text with formatting options",
|
|
19
|
+
aiInstructions: `Text "content" can contain minimal HTML tags like <strong>, <em>, <br> and <a> as well as <h1>, <h2>, <h3>, <h4>, <p> and <span> and lists.
|
|
20
|
+
Only 'align' is supported as an inline style, so don't use other inline styles like 'font-size' or 'color' in the content prop.
|
|
21
|
+
You may simply omit the "colorPreset" property so that the brick will inherit the default color from its parent container.
|
|
22
|
+
`,
|
|
23
|
+
defaultWidth: {
|
|
24
|
+
mobile: "100%",
|
|
25
|
+
},
|
|
26
|
+
defaultHeight: {
|
|
27
|
+
desktop: "auto",
|
|
28
|
+
mobile: "auto",
|
|
29
|
+
},
|
|
30
|
+
staticClasses: "prose lg:prose-lg",
|
|
31
|
+
icon: RxTextAlignLeft,
|
|
32
|
+
props: defineProps({
|
|
33
|
+
colorPreset: Type.Optional(
|
|
34
|
+
colorPresetRef({
|
|
35
|
+
title: "Color",
|
|
36
|
+
}),
|
|
37
|
+
),
|
|
38
|
+
content: textContentRef({
|
|
39
|
+
title: "Content",
|
|
40
|
+
// metadata: {
|
|
41
|
+
// category: "content",
|
|
42
|
+
// },
|
|
43
|
+
}),
|
|
44
|
+
verticalAlign: Type.Optional(
|
|
45
|
+
alignItemsRef({
|
|
46
|
+
default: "items-center",
|
|
47
|
+
title: "Align",
|
|
48
|
+
}),
|
|
49
|
+
),
|
|
50
|
+
padding: Type.Optional(
|
|
51
|
+
cssLengthRef({
|
|
52
|
+
default: "2rem",
|
|
53
|
+
description: "Padding inside the text.",
|
|
54
|
+
"ai:instructions": "Use only a single value like '1rem' or '10px'",
|
|
55
|
+
title: "Padding",
|
|
56
|
+
"ui:responsive": true,
|
|
57
|
+
"ui:placeholder": "Not specified",
|
|
58
|
+
"ui:styleId": "styles:padding",
|
|
59
|
+
}),
|
|
60
|
+
),
|
|
61
|
+
rounding: Type.Optional(
|
|
62
|
+
roundingRef({
|
|
63
|
+
default: "rounded-md",
|
|
64
|
+
}),
|
|
65
|
+
),
|
|
66
|
+
border: Type.Optional(borderRef()),
|
|
67
|
+
shadow: Type.Optional(shadowRef()),
|
|
68
|
+
loop: Type.Optional(loopRef()),
|
|
69
|
+
}),
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export type Manifest = typeof manifest;
|
|
73
|
+
|
|
74
|
+
export const examples: {
|
|
75
|
+
description: string;
|
|
76
|
+
type: string;
|
|
77
|
+
props: BrickProps<Manifest>["brick"]["props"];
|
|
78
|
+
}[] = [
|
|
79
|
+
{
|
|
80
|
+
description: "Welcome paragraph with emphasis and padding",
|
|
81
|
+
type: "text",
|
|
82
|
+
props: {
|
|
83
|
+
content:
|
|
84
|
+
"Welcome to our platform! We're <strong>excited</strong> to have you here. Our mission is to <em>transform</em> the way you work with cutting-edge technology and <a href='/features'>innovative features</a>.",
|
|
85
|
+
padding: "2rem",
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
description: "Feature list with HTML formatting and smaller padding",
|
|
90
|
+
type: "text",
|
|
91
|
+
props: {
|
|
92
|
+
content:
|
|
93
|
+
"<h3>Key Features</h3><ul><li><strong>Advanced Analytics</strong> - Real-time data insights</li><li><strong>Cloud Integration</strong> - Seamless connectivity</li><li><strong>24/7 Support</strong> - Always here to help</li></ul>",
|
|
94
|
+
padding: "1rem",
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
description: "Quote block with text styling but no background",
|
|
99
|
+
type: "text",
|
|
100
|
+
props: {
|
|
101
|
+
content:
|
|
102
|
+
"<p style='text-align: center'><em>\"Innovation distinguishes between a leader and a follower.\"</em><br><strong>- Steve Jobs</strong></p>",
|
|
103
|
+
padding: "3rem",
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
description: "Simple heading with subtle background",
|
|
108
|
+
type: "text",
|
|
109
|
+
props: {
|
|
110
|
+
content:
|
|
111
|
+
"<h2>About Our Company</h2><p>We've been serving customers since 2010, building trust through quality products and exceptional service.</p>",
|
|
112
|
+
colorPreset: {
|
|
113
|
+
color: "primary-100",
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
description: "Team introduction with formatting, no background color",
|
|
119
|
+
type: "text",
|
|
120
|
+
props: {
|
|
121
|
+
content:
|
|
122
|
+
"<p style='text-align: center'><strong>Meet Our Team</strong></p><p>Our diverse team of experts brings together decades of experience in technology, design, and business strategy. We're passionate about <em>creating solutions</em> that make a real difference.</p><p><a href='/team'>Learn more about our team</a> and the values that drive us forward.</p>",
|
|
123
|
+
padding: "2rem",
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
description: "Maintenance notice with neutral background and border",
|
|
128
|
+
type: "text",
|
|
129
|
+
props: {
|
|
130
|
+
content:
|
|
131
|
+
"<p>Scheduled maintenance will occur on <em>Sunday, March 15th</em> from 2:00 AM to 6:00 AM UTC.</p><p>During this time, some features may be temporarily unavailable. We apologize for any inconvenience.</p>",
|
|
132
|
+
padding: "1rem",
|
|
133
|
+
colorPreset: {
|
|
134
|
+
color: "neutral-700",
|
|
135
|
+
},
|
|
136
|
+
border: {
|
|
137
|
+
width: "border",
|
|
138
|
+
color: "border-neutral-400",
|
|
139
|
+
},
|
|
140
|
+
rounding: "rounded-lg",
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
description: "Minimal text with no padding or background",
|
|
145
|
+
type: "text",
|
|
146
|
+
props: {
|
|
147
|
+
content: "This is some minimal text.",
|
|
148
|
+
padding: "0rem",
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
description: "Call-to-action text with secondary background and shadow",
|
|
153
|
+
type: "text",
|
|
154
|
+
props: {
|
|
155
|
+
content:
|
|
156
|
+
"<h3 style='text-align: center'>Ready to Get Started?</h3><p style='text-align: center'>Join thousands of satisfied customers who trust our platform. <strong>Sign up today</strong> and experience the difference!</p><p style='text-align: center'><a href='/signup'>Create Your Free Account</a></p>",
|
|
157
|
+
colorPreset: {
|
|
158
|
+
color: "secondary-200",
|
|
159
|
+
},
|
|
160
|
+
padding: "2.5rem",
|
|
161
|
+
rounding: "rounded-xl",
|
|
162
|
+
shadow: "shadow-md",
|
|
163
|
+
verticalAlign: "items-center",
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
description: "Technical documentation with accent colors and code-like formatting",
|
|
168
|
+
type: "text",
|
|
169
|
+
props: {
|
|
170
|
+
content:
|
|
171
|
+
"<h4>API Authentication</h4><p>To authenticate your requests, include your API key in the header:</p><p><strong>Authorization: Bearer YOUR_API_KEY</strong></p><p>All API endpoints require authentication. You can find your API key in the <a href='/dashboard'>dashboard settings</a>.</p>",
|
|
172
|
+
colorPreset: {
|
|
173
|
+
color: "accent-100",
|
|
174
|
+
},
|
|
175
|
+
padding: "1.5rem",
|
|
176
|
+
rounding: "rounded-md",
|
|
177
|
+
border: {
|
|
178
|
+
width: "border-4",
|
|
179
|
+
color: "border-accent-500",
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
description: "Success message with primary background and top alignment",
|
|
185
|
+
type: "text",
|
|
186
|
+
props: {
|
|
187
|
+
content:
|
|
188
|
+
"<h3>✅ Payment Successful!</h3><p>Thank you for your purchase. Your order <strong>#12345</strong> has been confirmed.</p><p>You will receive an email confirmation shortly at your registered email address.</p>",
|
|
189
|
+
colorPreset: {
|
|
190
|
+
color: "primary-200",
|
|
191
|
+
},
|
|
192
|
+
padding: "2rem",
|
|
193
|
+
rounding: "rounded-lg",
|
|
194
|
+
shadow: "shadow-sm",
|
|
195
|
+
verticalAlign: "items-start",
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
description: "Footer information with neutral dark theme and multiple links",
|
|
200
|
+
type: "text",
|
|
201
|
+
props: {
|
|
202
|
+
content:
|
|
203
|
+
"<p style='text-align: center'>© 2024 Company Name. All rights reserved.</p><p style='text-align: center'><a href='/privacy'>Privacy Policy</a> | <a href='/terms'>Terms of Service</a> | <a href='/contact'>Contact Us</a></p><p style='text-align: center'><em>Follow us on social media for the latest updates</em></p>",
|
|
204
|
+
colorPreset: {
|
|
205
|
+
color: "neutral-800",
|
|
206
|
+
},
|
|
207
|
+
padding: "1.5rem",
|
|
208
|
+
verticalAlign: "items-end",
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
description: "Product description with large padding and rounded corners",
|
|
213
|
+
type: "text",
|
|
214
|
+
props: {
|
|
215
|
+
content:
|
|
216
|
+
"<h2>Premium Wireless Headphones</h2><p>Experience <strong>crystal-clear audio</strong> with our latest wireless headphones featuring:</p><ul><li>Active noise cancellation</li><li>30-hour battery life</li><li>Premium leather comfort</li><li>Hi-res audio certification</li></ul><p>Perfect for <em>music lovers</em> and <em>professionals</em> alike.</p>",
|
|
217
|
+
padding: "3rem",
|
|
218
|
+
rounding: "rounded-2xl",
|
|
219
|
+
shadow: "shadow-lg",
|
|
220
|
+
border: {
|
|
221
|
+
width: "border",
|
|
222
|
+
color: "border-neutral-300",
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
description: "Emergency alert with accent background and extra bold formatting",
|
|
228
|
+
type: "text",
|
|
229
|
+
props: {
|
|
230
|
+
content:
|
|
231
|
+
"<h3 style='text-align: center'>⚠️ URGENT NOTICE</h3><p style='text-align: center'><strong>System maintenance is currently in progress.</strong></p><p style='text-align: center'>Some services may be <em>temporarily unavailable</em>. We expect full restoration by 4:00 PM EST.</p><p style='text-align: center'>For urgent support, please <a href='/emergency-contact'>contact our emergency line</a>.</p>",
|
|
232
|
+
colorPreset: {
|
|
233
|
+
color: "accent-400",
|
|
234
|
+
},
|
|
235
|
+
padding: "2rem",
|
|
236
|
+
rounding: "rounded-md",
|
|
237
|
+
border: {
|
|
238
|
+
width: "border-2",
|
|
239
|
+
color: "border-accent-600",
|
|
240
|
+
},
|
|
241
|
+
shadow: "shadow-xl",
|
|
242
|
+
verticalAlign: "items-center",
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
];
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { defineBrickManifest } from "~/shared/brick-manifest";
|
|
2
|
+
import { defineProps } from "../props/helpers";
|
|
3
|
+
import { RxVideo } from "react-icons/rx";
|
|
4
|
+
import { string } from "../props/string";
|
|
5
|
+
import type { BrickProps } from "../props/types";
|
|
6
|
+
import { borderRef, roundingRef } from "../props/border";
|
|
7
|
+
import { shadowRef } from "../props/effects";
|
|
8
|
+
import { Type } from "@sinclair/typebox";
|
|
9
|
+
import { cssLengthRef } from "../props/css-length";
|
|
10
|
+
|
|
11
|
+
export const manifest = defineBrickManifest({
|
|
12
|
+
type: "video",
|
|
13
|
+
name: "Video",
|
|
14
|
+
category: "media",
|
|
15
|
+
description: "An embedded video player for YouTube / Vimeo / Wistia links",
|
|
16
|
+
icon: RxVideo,
|
|
17
|
+
defaultWidth: {
|
|
18
|
+
mobile: "auto",
|
|
19
|
+
desktop: `${(360 * 16) / 9}px`, // 16:9 aspect ratio
|
|
20
|
+
},
|
|
21
|
+
defaultHeight: {
|
|
22
|
+
mobile: "168px",
|
|
23
|
+
desktop: "360px", // 16:9 aspect ratio
|
|
24
|
+
},
|
|
25
|
+
minWidth: {
|
|
26
|
+
mobile: 300,
|
|
27
|
+
desktop: (360 * 16) / 9,
|
|
28
|
+
},
|
|
29
|
+
minHeight: {
|
|
30
|
+
mobile: 168,
|
|
31
|
+
desktop: 360, // 16:9 aspect ratio
|
|
32
|
+
},
|
|
33
|
+
props: defineProps({
|
|
34
|
+
url: string("Video URL", {
|
|
35
|
+
description:
|
|
36
|
+
"URL of the video to embed. It can be a YouTube link or an embed link. It also supports Vimeo and Wistia links.",
|
|
37
|
+
default: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
|
|
38
|
+
metadata: {
|
|
39
|
+
category: "content",
|
|
40
|
+
"ui:responsive": "desktop",
|
|
41
|
+
},
|
|
42
|
+
}),
|
|
43
|
+
padding: Type.Optional(
|
|
44
|
+
cssLengthRef({
|
|
45
|
+
description: "Padding inside the video player.",
|
|
46
|
+
"ai:instructions": "Use only a single value like '1rem' or '10px'",
|
|
47
|
+
title: "Padding",
|
|
48
|
+
"ui:responsive": true,
|
|
49
|
+
"ui:placeholder": "Not specified",
|
|
50
|
+
"ui:styleId": "styles:padding",
|
|
51
|
+
}),
|
|
52
|
+
),
|
|
53
|
+
rounding: Type.Optional(
|
|
54
|
+
roundingRef({
|
|
55
|
+
default: "rounded-md",
|
|
56
|
+
}),
|
|
57
|
+
),
|
|
58
|
+
border: Type.Optional(borderRef()),
|
|
59
|
+
shadow: Type.Optional(shadowRef()),
|
|
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: "A YouTube video",
|
|
72
|
+
type: "video",
|
|
73
|
+
props: {
|
|
74
|
+
url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
description: "An embedded YouTube video",
|
|
79
|
+
type: "video",
|
|
80
|
+
props: {
|
|
81
|
+
url: "https://www.youtube.com/embed/dQw4w9WgXcQ",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
description: "A Vimeo video",
|
|
86
|
+
type: "video",
|
|
87
|
+
props: {
|
|
88
|
+
url: "https://vimeo.com/123456789",
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
description: "Dynamic course video using course query",
|
|
93
|
+
type: "video",
|
|
94
|
+
props: {
|
|
95
|
+
url: "{{course.videoUrl}}",
|
|
96
|
+
padding: "1rem",
|
|
97
|
+
rounding: "rounded-lg",
|
|
98
|
+
shadow: "shadow-md",
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
description: "Dynamic product demo video using product query",
|
|
103
|
+
type: "video",
|
|
104
|
+
props: {
|
|
105
|
+
url: "{{product.demoVideoUrl}}",
|
|
106
|
+
padding: "0.5rem",
|
|
107
|
+
rounding: "rounded-xl",
|
|
108
|
+
shadow: "shadow-lg",
|
|
109
|
+
border: {
|
|
110
|
+
width: "border-2",
|
|
111
|
+
color: "border-primary-300",
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
];
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { Static, StringOptions } from "@sinclair/typebox";
|
|
2
|
+
import { StringEnum } from "~/shared/utils/string-enum";
|
|
3
|
+
import { typedRef } from "~/shared/utils/typed-ref";
|
|
4
|
+
|
|
5
|
+
export function justifyContent(options: StringOptions = {}) {
|
|
6
|
+
return StringEnum(
|
|
7
|
+
["justify-start", "justify-center", "justify-end", "justify-between", "justify-around", "justify-evenly"],
|
|
8
|
+
{
|
|
9
|
+
enumNames: ["Start", "Center", "End", "Between", "Around", "Evenly"],
|
|
10
|
+
// $id: "styles:justifyContent",
|
|
11
|
+
title: "Justify bricks",
|
|
12
|
+
"ui:field": "justify-content",
|
|
13
|
+
"ui:responsive": true,
|
|
14
|
+
"ui:styleId": "styles:justifyContent",
|
|
15
|
+
examples: ["justify-center", "justify-evenly"],
|
|
16
|
+
...options,
|
|
17
|
+
},
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type JustifyContentSettings = Static<ReturnType<typeof justifyContent>>;
|
|
22
|
+
|
|
23
|
+
export function justifyContentRef(options: StringOptions = {}) {
|
|
24
|
+
return typedRef("styles:justifyContent", options);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function alignItems(options: StringOptions = {}) {
|
|
28
|
+
return StringEnum(["items-start", "items-center", "items-end", "items-stretch"], {
|
|
29
|
+
enumNames: ["Start", "Center", "End", "Stretch"],
|
|
30
|
+
// $id: "styles:alignItems",
|
|
31
|
+
title: "Align bricks",
|
|
32
|
+
"ui:field": "align-items",
|
|
33
|
+
"ui:responsive": true,
|
|
34
|
+
"ui:styleId": "styles:alignItems",
|
|
35
|
+
examples: ["items-center", "items-stretch"],
|
|
36
|
+
...options,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type AlignItemsSettings = Static<ReturnType<typeof alignItems>>;
|
|
41
|
+
|
|
42
|
+
export function alignItemsRef(options: StringOptions = {}) {
|
|
43
|
+
return typedRef("styles:alignItems", options);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function alignSelf(options: StringOptions = {}) {
|
|
47
|
+
return StringEnum(["self-auto", "self-start", "self-center", "self-end", "self-stretch"], {
|
|
48
|
+
enumNames: ["Auto", "Start", "Center", "End", "Stretch"],
|
|
49
|
+
default: "self-auto",
|
|
50
|
+
// $id: "styles:alignSelf",
|
|
51
|
+
title: "Align self",
|
|
52
|
+
"ui:field": "align-self",
|
|
53
|
+
"ui:responsive": true,
|
|
54
|
+
"ui:styleId": "styles:alignSelf",
|
|
55
|
+
...options,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type AlignSelfSettings = Static<ReturnType<typeof alignSelf>>;
|
|
60
|
+
|
|
61
|
+
export function alignSelfRef(options: StringOptions = {}) {
|
|
62
|
+
return typedRef("styles:alignSelf", options);
|
|
63
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { type SchemaOptions, Type, type Static } from "@sinclair/typebox";
|
|
2
|
+
import type { ElementColorType } from "~/shared/themes/color-system";
|
|
3
|
+
import { StringEnum } from "~/shared/utils/string-enum";
|
|
4
|
+
import { typedRef } from "~/shared/utils/typed-ref";
|
|
5
|
+
|
|
6
|
+
type BackgroundOptions = {
|
|
7
|
+
title?: string;
|
|
8
|
+
default?: {
|
|
9
|
+
image?: string;
|
|
10
|
+
size?: string;
|
|
11
|
+
repeat?: string;
|
|
12
|
+
};
|
|
13
|
+
colorType?: ElementColorType;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export function background(opts: BackgroundOptions = {}) {
|
|
17
|
+
const { default: defValue, ...restOpts } = opts;
|
|
18
|
+
return Type.Object(
|
|
19
|
+
{
|
|
20
|
+
image: Type.String({
|
|
21
|
+
title: "Image",
|
|
22
|
+
description: "The background image. Can be a URL or a data URI",
|
|
23
|
+
format: "image",
|
|
24
|
+
examples: ["https://example.com/image.png"],
|
|
25
|
+
}),
|
|
26
|
+
size: Type.Optional(
|
|
27
|
+
StringEnum(["auto", "cover", "contain"], {
|
|
28
|
+
enumNames: ["Auto", "Cover", "Contain"],
|
|
29
|
+
default: defValue?.size ?? "auto",
|
|
30
|
+
"ai:instructions": "Only use this when the image is set.",
|
|
31
|
+
}),
|
|
32
|
+
),
|
|
33
|
+
repeat: Type.Optional(
|
|
34
|
+
StringEnum(["no-repeat", "repeat", "repeat-x", "repeat-y", "space", "round"], {
|
|
35
|
+
enumNames: ["No repeat", "Repeat", "Repeat horizontally", "Repeat vertically", "Space", "Round"],
|
|
36
|
+
default: defValue?.repeat ?? "no-repeat",
|
|
37
|
+
"ai:instructions": "Only use this when the image is set.",
|
|
38
|
+
}),
|
|
39
|
+
),
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
// $id: "styles:background",
|
|
43
|
+
"ui:styleId": "styles:background",
|
|
44
|
+
"ui:field": "background",
|
|
45
|
+
title: "Background image",
|
|
46
|
+
// disable for now
|
|
47
|
+
// "ui:show-img-search": true,
|
|
48
|
+
default: defValue,
|
|
49
|
+
...restOpts,
|
|
50
|
+
},
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export type BackgroundSettings = Static<ReturnType<typeof background>>;
|
|
55
|
+
|
|
56
|
+
export function backgroundRef(options: SchemaOptions = {}) {
|
|
57
|
+
return typedRef("styles:background", options);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function backgroundColor(options: SchemaOptions = {}) {
|
|
61
|
+
return Type.String({
|
|
62
|
+
title: "Background color",
|
|
63
|
+
// $id: "styles:backgroundColor",
|
|
64
|
+
"ai:instructions":
|
|
65
|
+
"Can be set to transparent, hex/rgb/rgba color, or classes like `bg-<variant>-<shade>`, variants being primary, secondary, accent and neutral, and shades between 100 and 900. Use bg-<variant>-<shade> classes as much as possible.",
|
|
66
|
+
"ui:field": "color",
|
|
67
|
+
"ui:color-type": "background",
|
|
68
|
+
// "ui:advanced": true,
|
|
69
|
+
"ui:styleId": "styles:backgroundColor",
|
|
70
|
+
"ui:responsive": "desktop",
|
|
71
|
+
...options,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export type BackgroundColorSettings = Static<ReturnType<typeof backgroundColor>>;
|
|
76
|
+
|
|
77
|
+
export function backgroundColorRef(options: SchemaOptions = {}) {
|
|
78
|
+
return typedRef("styles:backgroundColor", options);
|
|
79
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
|
|
3
|
+
type BooleanOptions = Record<string, unknown>;
|
|
4
|
+
|
|
5
|
+
export function boolean(title: string, defaultValue?: boolean, options: BooleanOptions = {}) {
|
|
6
|
+
return Type.Boolean({ title, default: defaultValue ?? false, ...options });
|
|
7
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { type ObjectOptions, Type, type Static, type StringOptions } from "@sinclair/typebox";
|
|
2
|
+
import { typedRef } from "~/shared/utils/typed-ref";
|
|
3
|
+
import { StringEnum } from "~/shared/utils/string-enum";
|
|
4
|
+
import { borderColorRef } from "./color";
|
|
5
|
+
|
|
6
|
+
export function border(opts: ObjectOptions = {}) {
|
|
7
|
+
return Type.Object(
|
|
8
|
+
{
|
|
9
|
+
width: StringEnum(["border-0", "border", "border-2", "border-4", "border-8"], {
|
|
10
|
+
title: "Width",
|
|
11
|
+
enumNames: ["None", "Small", "Medium", "Large", "Extra large"],
|
|
12
|
+
"ai:instructions": "Don't specify width if you want no border.",
|
|
13
|
+
"ui:field": "enum",
|
|
14
|
+
"ui:display": "select",
|
|
15
|
+
"ui:placeholder": "None",
|
|
16
|
+
default: "border-0",
|
|
17
|
+
}),
|
|
18
|
+
color: borderColorRef({
|
|
19
|
+
title: "Color",
|
|
20
|
+
description: "The color of the border.",
|
|
21
|
+
default: "border-current",
|
|
22
|
+
}),
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
title: "Border",
|
|
26
|
+
"ui:styleId": "styles:border",
|
|
27
|
+
description: "Set the border width and color.",
|
|
28
|
+
"ui:field": "border",
|
|
29
|
+
"ui:responsive": true,
|
|
30
|
+
examples: [
|
|
31
|
+
{
|
|
32
|
+
width: "border-2",
|
|
33
|
+
color: "border-primary-200",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
width: "border-4",
|
|
37
|
+
color: "border-accent-400",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
width: "border",
|
|
41
|
+
color: "border-neutral-100",
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
...opts,
|
|
45
|
+
},
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type BorderSettings = Static<ReturnType<typeof border>>;
|
|
50
|
+
|
|
51
|
+
export function borderRef(
|
|
52
|
+
options: Omit<ObjectOptions, "default"> & { default?: Partial<BorderSettings> } = {},
|
|
53
|
+
) {
|
|
54
|
+
return typedRef("styles:border", options);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function rounding(opts: StringOptions = {}) {
|
|
58
|
+
return Type.Optional(
|
|
59
|
+
StringEnum(
|
|
60
|
+
[
|
|
61
|
+
"rounded-auto",
|
|
62
|
+
"rounded-none",
|
|
63
|
+
"rounded-sm",
|
|
64
|
+
"rounded-md",
|
|
65
|
+
"rounded-lg",
|
|
66
|
+
"rounded-xl",
|
|
67
|
+
"rounded-2xl",
|
|
68
|
+
"rounded-full",
|
|
69
|
+
],
|
|
70
|
+
{
|
|
71
|
+
title: "Corner rounding",
|
|
72
|
+
enumNames: ["Auto", "None", "Small", "Medium", "Large", "Extra large", "2xl", "Full"],
|
|
73
|
+
// $id: "styles:rounding",
|
|
74
|
+
"ui:styleId": "styles:rounding",
|
|
75
|
+
"ui:responsive": "desktop",
|
|
76
|
+
...opts,
|
|
77
|
+
},
|
|
78
|
+
),
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type RoundingSettings = Static<ReturnType<typeof rounding>>;
|
|
83
|
+
|
|
84
|
+
export function roundingRef(options: StringOptions = {}) {
|
|
85
|
+
return typedRef("styles:rounding", options);
|
|
86
|
+
}
|