@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,127 @@
|
|
|
1
|
+
import { defineBrickManifest } from "~/shared/brick-manifest";
|
|
2
|
+
import { defineProps } from "../props/helpers";
|
|
3
|
+
import type { BrickProps } from "../props/types";
|
|
4
|
+
import { BsCodeSquare } from "react-icons/bs";
|
|
5
|
+
|
|
6
|
+
import { Type } from "@sinclair/typebox";
|
|
7
|
+
|
|
8
|
+
export const manifest = defineBrickManifest({
|
|
9
|
+
type: "html",
|
|
10
|
+
name: "Html",
|
|
11
|
+
category: "widgets",
|
|
12
|
+
description:
|
|
13
|
+
"A flexible brick that accepts HTML content. Useful for embeding custom HTML or third-party widgets.",
|
|
14
|
+
aiInstructions:
|
|
15
|
+
"Use only this brick type when integrating third party widgets or custom HTML content. Most of the time, you should use other bricks that are more secure and easier to use.",
|
|
16
|
+
staticClasses: "self-stretch",
|
|
17
|
+
defaultWidth: {
|
|
18
|
+
mobile: "auto",
|
|
19
|
+
desktop: "300px",
|
|
20
|
+
},
|
|
21
|
+
icon: BsCodeSquare,
|
|
22
|
+
props: defineProps({
|
|
23
|
+
html: Type.String({
|
|
24
|
+
title: "HTML Content",
|
|
25
|
+
description: "The HTML content to render. Use with caution, as it can introduce security risks.",
|
|
26
|
+
default: "<div>Your HTML content here</div>",
|
|
27
|
+
"ui:placeholder": "<div>Your HTML content here</div>",
|
|
28
|
+
"ui:multiline": true,
|
|
29
|
+
metadata: {
|
|
30
|
+
category: "content",
|
|
31
|
+
},
|
|
32
|
+
}),
|
|
33
|
+
}),
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export type Manifest = typeof manifest;
|
|
37
|
+
|
|
38
|
+
export const examples: {
|
|
39
|
+
description: string;
|
|
40
|
+
type: string;
|
|
41
|
+
props: BrickProps<Manifest>["brick"]["props"];
|
|
42
|
+
}[] = [
|
|
43
|
+
{
|
|
44
|
+
description: "A tally form",
|
|
45
|
+
type: "html",
|
|
46
|
+
props: {
|
|
47
|
+
html: '<iframe data-tally-src="https://tally.so/embed/wQZpd8?alignLeft=1&hideTitle=1&transparentBackground=1&dynamicHeight=1" loading="lazy" width="100%" height="282" frameborder="0" marginheight="0" marginwidth="0" title="test"></iframe>',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
description: "YouTube video embed",
|
|
52
|
+
type: "html",
|
|
53
|
+
props: {
|
|
54
|
+
html: '<iframe width="560" height="315" src="https://www.youtube.com/embed/dQw4w9WgXcQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
description: "Google Maps embed",
|
|
59
|
+
type: "html",
|
|
60
|
+
props: {
|
|
61
|
+
html: '<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3024.309059887159!2d-74.00849368459473!3d40.71278097932847!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x89c25a165bedccab%3A0xa2008c34c27bfb67!2sWall%20St%2C%20New%20York%2C%20NY%2C%20USA!5e0!3m2!1sen!2sus!4v1620000000000" width="100%" height="300" style="border:0;" allowfullscreen="" loading="lazy"></iframe>',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
description: "Twitter tweet embed",
|
|
66
|
+
type: "html",
|
|
67
|
+
props: {
|
|
68
|
+
html: '<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Just setting up my twttr</p>— Jack Dorsey (@jack) <a href="https://twitter.com/jack/status/20?ref_src=twsrc%5Etfw">March 21, 2006</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
description: "CodePen embed for code showcase",
|
|
73
|
+
type: "html",
|
|
74
|
+
props: {
|
|
75
|
+
html: '<iframe height="300" style="width: 100%;" scrolling="no" title="CSS Animation Example" src="https://codepen.io/team/codepen/embed/PNaGbb?height=300&theme-id=light&default-tab=result" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true"></iframe>',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
description: "Calendly scheduling widget",
|
|
80
|
+
type: "html",
|
|
81
|
+
props: {
|
|
82
|
+
html: '<div class="calendly-inline-widget" data-url="https://calendly.com/your-name/30min" style="min-width:320px;height:630px;"></div><script type="text/javascript" src="https://assets.calendly.com/assets/external/widget.js" async></script>',
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
description: "Custom pricing table with CSS styling",
|
|
87
|
+
type: "html",
|
|
88
|
+
props: {
|
|
89
|
+
html: '<div style="display: flex; gap: 20px; justify-content: center;"><div style="border: 2px solid #e2e8f0; border-radius: 12px; padding: 24px; text-align: center; background: white;"><h3 style="margin: 0 0 16px; color: #1e293b;">Basic</h3><div style="font-size: 32px; font-weight: bold; color: #0ea5e9;">$9</div><p style="color: #64748b; margin: 8px 0 20px;">per month</p><ul style="list-style: none; padding: 0; margin: 0;"><li style="padding: 8px 0;">✓ 5 Projects</li><li style="padding: 8px 0;">✓ 10GB Storage</li><li style="padding: 8px 0;">✓ Email Support</li></ul></div></div>',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
description: "Mailchimp newsletter signup form",
|
|
94
|
+
type: "html",
|
|
95
|
+
props: {
|
|
96
|
+
html: '<div id="mc_embed_signup"><form action="https://your-domain.us1.list-manage.com/subscribe/post?u=123456789&id=abcdefghij" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate><div id="mc_embed_signup_scroll"><div class="mc-field-group"><label for="mce-EMAIL">Email Address</label><input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL" style="width: 100%; padding: 10px; margin: 8px 0; border: 1px solid #ccc; border-radius: 4px;"></div><div id="mce-responses" class="clear"><div class="response" id="mce-error-response" style="display:none"></div><div class="response" id="mce-success-response" style="display:none"></div></div><div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_123456789_abcdefghij" tabindex="-1" value=""></div><div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button" style="background: #007cba; color: white; padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer;"></div></div></form></div>',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
description: "Stripe payment button integration",
|
|
101
|
+
type: "html",
|
|
102
|
+
props: {
|
|
103
|
+
html: '<script async src="https://js.stripe.com/v3/buy-button.js"></script><stripe-buy-button buy-button-id="buy_btn_1234567890" publishable-key="pk_test_1234567890"></stripe-buy-button>',
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
description: "Instagram post embed",
|
|
108
|
+
type: "html",
|
|
109
|
+
props: {
|
|
110
|
+
html: '<blockquote class="instagram-media" data-instgrm-captioned data-instgrm-permalink="https://www.instagram.com/p/ABC123/" data-instgrm-version="14" style="background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:540px; min-width:326px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);"></blockquote><script async src="//www.instagram.com/embed.js"></script>',
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
description: "Custom countdown timer widget",
|
|
115
|
+
type: "html",
|
|
116
|
+
props: {
|
|
117
|
+
html: '<div style="text-align: center; padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 12px; color: white;"><h3 style="margin: 0 0 20px; font-size: 24px;">Event Countdown</h3><div id="countdown" style="display: flex; justify-content: center; gap: 20px;"><div style="text-align: center;"><div style="font-size: 32px; font-weight: bold;">10</div><div style="font-size: 14px; opacity: 0.8;">DAYS</div></div><div style="text-align: center;"><div style="font-size: 32px; font-weight: bold;">15</div><div style="font-size: 14px; opacity: 0.8;">HOURS</div></div><div style="text-align: center;"><div style="font-size: 32px; font-weight: bold;">30</div><div style="font-size: 14px; opacity: 0.8;">MINUTES</div></div></div></div>',
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
description: "Interactive feedback widget with rating stars",
|
|
122
|
+
type: "html",
|
|
123
|
+
props: {
|
|
124
|
+
html: '<div style="border: 1px solid #e2e8f0; border-radius: 8px; padding: 24px; background: #f8fafc;"><h4 style="margin: 0 0 16px; color: #1e293b;">How was your experience?</h4><div style="display: flex; gap: 8px; margin: 16px 0;"><span style="font-size: 24px; cursor: pointer; color: #fbbf24;">★</span><span style="font-size: 24px; cursor: pointer; color: #fbbf24;">★</span><span style="font-size: 24px; cursor: pointer; color: #fbbf24;">★</span><span style="font-size: 24px; cursor: pointer; color: #fbbf24;">★</span><span style="font-size: 24px; cursor: pointer; color: #d1d5db;">★</span></div><textarea placeholder="Tell us more about your experience..." style="width: 100%; height: 80px; padding: 12px; border: 1px solid #d1d5db; border-radius: 6px; resize: vertical; font-family: inherit;"></textarea><button style="margin-top: 12px; background: #3b82f6; color: white; padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer;">Submit Feedback</button></div>',
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
];
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { defineBrickManifest } from "~/shared/brick-manifest";
|
|
2
|
+
import { defineProps } from "../props/helpers";
|
|
3
|
+
import { PiConfetti } from "react-icons/pi";
|
|
4
|
+
import { iconRef, urlOrPageIdRef } from "../props/string";
|
|
5
|
+
import type { BrickProps } from "../props/types";
|
|
6
|
+
import { Type } from "@sinclair/typebox";
|
|
7
|
+
import { cssLengthRef } from "../props/css-length";
|
|
8
|
+
import { colorRef } from "../props/color";
|
|
9
|
+
import { loopRef } from "../props/dynamic";
|
|
10
|
+
|
|
11
|
+
export const manifest = defineBrickManifest({
|
|
12
|
+
type: "icon",
|
|
13
|
+
name: "Icon",
|
|
14
|
+
category: "basic",
|
|
15
|
+
description: "An icon.",
|
|
16
|
+
aiInstructions: "Uses iconify references",
|
|
17
|
+
resizable: false,
|
|
18
|
+
staticClasses: "!grow-0",
|
|
19
|
+
icon: PiConfetti,
|
|
20
|
+
props: defineProps(
|
|
21
|
+
{
|
|
22
|
+
icon: iconRef({
|
|
23
|
+
default: "mdi:heart",
|
|
24
|
+
}),
|
|
25
|
+
size: Type.Optional(
|
|
26
|
+
cssLengthRef({
|
|
27
|
+
title: "Size",
|
|
28
|
+
description: "The size of the icon. Can be a CSS length value (e.g. '2em', '24px')",
|
|
29
|
+
default: "1em",
|
|
30
|
+
"ui:css-units": ["em", "rem", "px"],
|
|
31
|
+
"ai:instructions": "Use 'em', 'rem', or 'px' for units. Example: '2em', '24px'",
|
|
32
|
+
}),
|
|
33
|
+
),
|
|
34
|
+
color: Type.Optional(
|
|
35
|
+
colorRef({
|
|
36
|
+
title: "Color",
|
|
37
|
+
default: "currentColor",
|
|
38
|
+
"ui:hide-color-label": true,
|
|
39
|
+
}),
|
|
40
|
+
),
|
|
41
|
+
link: Type.Optional(urlOrPageIdRef({ title: "Link" })),
|
|
42
|
+
loop: Type.Optional(loopRef()),
|
|
43
|
+
},
|
|
44
|
+
{ noGrow: true },
|
|
45
|
+
),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export type Manifest = typeof manifest;
|
|
49
|
+
|
|
50
|
+
export const examples: {
|
|
51
|
+
description: string;
|
|
52
|
+
type: string;
|
|
53
|
+
props: BrickProps<Manifest>["brick"]["props"];
|
|
54
|
+
}[] = [
|
|
55
|
+
{
|
|
56
|
+
description: "Large heart icon with inherited color and size",
|
|
57
|
+
type: "icon",
|
|
58
|
+
props: {
|
|
59
|
+
icon: "mdi:heart",
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
description: "Shopping cart icon",
|
|
64
|
+
type: "icon",
|
|
65
|
+
props: {
|
|
66
|
+
icon: "mdi:cart",
|
|
67
|
+
size: "1.2em",
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
description: "Social media icon with blue color and link",
|
|
72
|
+
type: "icon",
|
|
73
|
+
props: {
|
|
74
|
+
icon: "mdi:facebook",
|
|
75
|
+
size: "1.5em",
|
|
76
|
+
color: "#1877f2",
|
|
77
|
+
link: "https://facebook.com/yourpage",
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
description: "Warning icon with orange color for alerts",
|
|
82
|
+
type: "icon",
|
|
83
|
+
props: {
|
|
84
|
+
icon: "mdi:alert-triangle",
|
|
85
|
+
size: "1.8em",
|
|
86
|
+
color: "#f59e0b",
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
description: "Email contact icon with link",
|
|
91
|
+
type: "icon",
|
|
92
|
+
props: {
|
|
93
|
+
icon: "mdi:email",
|
|
94
|
+
size: "1.3em",
|
|
95
|
+
color: "#4f46e5",
|
|
96
|
+
link: "mailto:contact@example.com",
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
description: "Phone icon with green color",
|
|
101
|
+
type: "icon",
|
|
102
|
+
props: {
|
|
103
|
+
icon: "mdi:phone",
|
|
104
|
+
size: "1.4em",
|
|
105
|
+
color: "#10b981",
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
description: "Location pin icon with red color",
|
|
110
|
+
type: "icon",
|
|
111
|
+
props: {
|
|
112
|
+
icon: "mdi:map-marker",
|
|
113
|
+
size: "2.2em",
|
|
114
|
+
color: "#ef4444",
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
description: "Twitter/X icon with custom color and link",
|
|
119
|
+
type: "icon",
|
|
120
|
+
props: {
|
|
121
|
+
icon: "mdi:twitter",
|
|
122
|
+
size: "1.6em",
|
|
123
|
+
color: "#000000",
|
|
124
|
+
link: "https://x.com/yourhandle",
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
description: "Star rating icon with gold color",
|
|
129
|
+
type: "icon",
|
|
130
|
+
props: {
|
|
131
|
+
icon: "mdi:star",
|
|
132
|
+
size: "1.2em",
|
|
133
|
+
color: "#fbbf24",
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
description: "Download icon with link and purple color",
|
|
138
|
+
type: "icon",
|
|
139
|
+
props: {
|
|
140
|
+
icon: "mdi:download",
|
|
141
|
+
size: "1.5em",
|
|
142
|
+
color: "#8b5cf6",
|
|
143
|
+
link: "/files/brochure.pdf",
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
description: "Menu hamburger icon for navigation",
|
|
148
|
+
type: "icon",
|
|
149
|
+
props: {
|
|
150
|
+
icon: "mdi:menu",
|
|
151
|
+
size: "1.8em",
|
|
152
|
+
color: "#374151",
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
description: "Search icon with dark color",
|
|
157
|
+
type: "icon",
|
|
158
|
+
props: {
|
|
159
|
+
icon: "mdi:magnify",
|
|
160
|
+
size: "1.1em",
|
|
161
|
+
color: "#1f2937",
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
];
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
import { defineBrickManifest } from "~/shared/brick-manifest";
|
|
2
|
+
import { defineProps } from "../props/helpers";
|
|
3
|
+
import { imageRef } from "../props/image";
|
|
4
|
+
import { shadowRef } from "../props/effects";
|
|
5
|
+
import { RxImage } from "react-icons/rx";
|
|
6
|
+
import { string } from "../props/string";
|
|
7
|
+
import { Type } from "@sinclair/typebox";
|
|
8
|
+
import type { BrickProps } from "../props/types";
|
|
9
|
+
import { backgroundColorRef } from "../props/background";
|
|
10
|
+
import { borderRef, roundingRef } from "../props/border";
|
|
11
|
+
import { loopRef } from "../props/dynamic";
|
|
12
|
+
import { colorPresetRef } from "../props/color-preset";
|
|
13
|
+
import { cssLengthRef } from "../props/css-length";
|
|
14
|
+
|
|
15
|
+
export const manifest = defineBrickManifest({
|
|
16
|
+
type: "image",
|
|
17
|
+
name: "Image",
|
|
18
|
+
category: "media",
|
|
19
|
+
description: "An image brick",
|
|
20
|
+
aiInstructions:
|
|
21
|
+
"An image brick that can display an image with optional styling such as padding, border radius, and shadow. It supports giving credit to the image author and specifying the image provider.",
|
|
22
|
+
defaultWidth: { desktop: "auto", mobile: "100%" },
|
|
23
|
+
icon: RxImage,
|
|
24
|
+
props: defineProps({
|
|
25
|
+
image: imageRef({
|
|
26
|
+
metadata: {
|
|
27
|
+
category: "content",
|
|
28
|
+
},
|
|
29
|
+
}),
|
|
30
|
+
colorPreset: Type.Optional(colorPresetRef()),
|
|
31
|
+
padding: Type.Optional(
|
|
32
|
+
cssLengthRef({
|
|
33
|
+
description: "Padding inside the image.",
|
|
34
|
+
title: "Padding",
|
|
35
|
+
"ai:instructions": "Use only a single value like '1rem' or '10px'",
|
|
36
|
+
"ui:responsive": true,
|
|
37
|
+
"ui:placeholder": "Not specified",
|
|
38
|
+
"ui:styleId": "styles:padding",
|
|
39
|
+
}),
|
|
40
|
+
),
|
|
41
|
+
rounding: Type.Optional(
|
|
42
|
+
roundingRef({
|
|
43
|
+
default: "rounded-md",
|
|
44
|
+
}),
|
|
45
|
+
),
|
|
46
|
+
border: Type.Optional(borderRef()),
|
|
47
|
+
shadow: Type.Optional(shadowRef()),
|
|
48
|
+
blurHash: Type.Optional(
|
|
49
|
+
string("Blur Hash", {
|
|
50
|
+
"ui:field": "hidden",
|
|
51
|
+
description: "A placeholder for the image while it is loading. Use a blur hash string.",
|
|
52
|
+
}),
|
|
53
|
+
),
|
|
54
|
+
author: Type.Optional(
|
|
55
|
+
Type.Object(
|
|
56
|
+
{
|
|
57
|
+
name: string("Image Author", {
|
|
58
|
+
description: "Image author. Use this to give credit to the author",
|
|
59
|
+
}),
|
|
60
|
+
url: string("Image Author URL", {
|
|
61
|
+
description: "Image author URL. Use this to give credit to the author",
|
|
62
|
+
}),
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"ui:field": "hidden",
|
|
66
|
+
},
|
|
67
|
+
),
|
|
68
|
+
),
|
|
69
|
+
provider: Type.Optional(
|
|
70
|
+
string("Image Provider", {
|
|
71
|
+
"ui:field": "hidden",
|
|
72
|
+
"ai:instructions": "The provider of the image, e.g. 'unsplash', 'pexels', etc.",
|
|
73
|
+
}),
|
|
74
|
+
),
|
|
75
|
+
loop: Type.Optional(loopRef()),
|
|
76
|
+
}),
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
export type Manifest = typeof manifest;
|
|
80
|
+
|
|
81
|
+
export const examples: {
|
|
82
|
+
description: string;
|
|
83
|
+
type: string;
|
|
84
|
+
props: BrickProps<Manifest>["brick"]["props"];
|
|
85
|
+
}[] = [
|
|
86
|
+
{
|
|
87
|
+
description: "Hero landscape image with large shadow",
|
|
88
|
+
type: "image",
|
|
89
|
+
props: {
|
|
90
|
+
image: {
|
|
91
|
+
src: "https://via.placeholder.com/800x400.png?text=Hero+Landscape",
|
|
92
|
+
alt: "Beautiful landscape view for hero section",
|
|
93
|
+
},
|
|
94
|
+
shadow: "shadow-lg",
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
description: "Team member profile photo, full rounded",
|
|
99
|
+
type: "image",
|
|
100
|
+
props: {
|
|
101
|
+
image: {
|
|
102
|
+
src: "https://via.placeholder.com/300x300.png?text=Profile+Photo",
|
|
103
|
+
alt: "Team member profile photo",
|
|
104
|
+
},
|
|
105
|
+
shadow: "shadow-md",
|
|
106
|
+
rounding: "rounded-full",
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
description: "Product showcase image",
|
|
111
|
+
type: "image",
|
|
112
|
+
props: {
|
|
113
|
+
image: {
|
|
114
|
+
src: "https://via.placeholder.com/400x400.png?text=Product+Image",
|
|
115
|
+
alt: "Premium product showcase",
|
|
116
|
+
},
|
|
117
|
+
shadow: "shadow-sm",
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
description: "Blog article featured image with medium shadow and full author info",
|
|
122
|
+
type: "image",
|
|
123
|
+
props: {
|
|
124
|
+
image: {
|
|
125
|
+
src: "https://via.placeholder.com/600x300.png?text=Article+Featured",
|
|
126
|
+
alt: "Featured image for blog article",
|
|
127
|
+
},
|
|
128
|
+
author: {
|
|
129
|
+
name: "John Photographer",
|
|
130
|
+
url: "https://example.com/john",
|
|
131
|
+
},
|
|
132
|
+
provider: "unsplash",
|
|
133
|
+
shadow: "shadow-md",
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
{
|
|
138
|
+
description: "Logo image with padding and small shadow",
|
|
139
|
+
type: "image",
|
|
140
|
+
props: {
|
|
141
|
+
image: {
|
|
142
|
+
src: "https://via.placeholder.com/200x80.png?text=Company+Logo",
|
|
143
|
+
alt: "Company logo",
|
|
144
|
+
},
|
|
145
|
+
padding: "p-8",
|
|
146
|
+
shadow: "shadow-sm",
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
description: "Testimonial customer photo with large shadow and small padding",
|
|
151
|
+
type: "image",
|
|
152
|
+
props: {
|
|
153
|
+
image: {
|
|
154
|
+
src: "https://via.placeholder.com/120x120.png?text=Customer",
|
|
155
|
+
alt: "Happy customer testimonial photo",
|
|
156
|
+
},
|
|
157
|
+
shadow: "shadow-lg",
|
|
158
|
+
padding: "p-2",
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
description: "Event banner image with neutral-500 background",
|
|
163
|
+
type: "image",
|
|
164
|
+
props: {
|
|
165
|
+
colorPreset: { color: "neutral-500" },
|
|
166
|
+
image: {
|
|
167
|
+
src: "https://via.placeholder.com/800x200.png?text=Event+Banner",
|
|
168
|
+
alt: "Annual conference event banner",
|
|
169
|
+
},
|
|
170
|
+
shadow: "shadow-xl",
|
|
171
|
+
author: {
|
|
172
|
+
name: "Event Photographer",
|
|
173
|
+
url: "https://example.com/photographer",
|
|
174
|
+
},
|
|
175
|
+
provider: "pexels",
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
description: "Illustration with background and padding",
|
|
180
|
+
type: "image",
|
|
181
|
+
props: {
|
|
182
|
+
image: {
|
|
183
|
+
src: "https://via.placeholder.com/150x150.png?text=Blabla+Feature",
|
|
184
|
+
alt: "Feature illustration",
|
|
185
|
+
},
|
|
186
|
+
padding: "p-8",
|
|
187
|
+
shadow: "shadow-sm",
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
description: "Image with blurHash",
|
|
192
|
+
type: "image",
|
|
193
|
+
props: {
|
|
194
|
+
image: {
|
|
195
|
+
src: "https://via.placeholder.com/300x200.png?text=Card+Image",
|
|
196
|
+
alt: "My image",
|
|
197
|
+
},
|
|
198
|
+
shadow: "shadow-md",
|
|
199
|
+
blurHash: "L6PZfSi_.AyE_3t7t7R**0o#DgR4",
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
description: "Dynamic employee photo using employee query",
|
|
204
|
+
type: "image",
|
|
205
|
+
props: {
|
|
206
|
+
image: {
|
|
207
|
+
src: "{{employee.photo}}",
|
|
208
|
+
alt: "Photo of {{employee.fullName}}",
|
|
209
|
+
},
|
|
210
|
+
rounding: "rounded-full",
|
|
211
|
+
shadow: "shadow-lg",
|
|
212
|
+
padding: "1rem",
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
description: "Dynamic product image using product query with author attribution",
|
|
217
|
+
type: "image",
|
|
218
|
+
props: {
|
|
219
|
+
image: {
|
|
220
|
+
src: "{{product.featuredImage}}",
|
|
221
|
+
alt: "{{product.name}} - {{product.category}}",
|
|
222
|
+
},
|
|
223
|
+
author: {
|
|
224
|
+
name: "{{product.photographer}}",
|
|
225
|
+
url: "{{product.photographerUrl}}",
|
|
226
|
+
},
|
|
227
|
+
provider: "company-assets",
|
|
228
|
+
shadow: "shadow-md",
|
|
229
|
+
rounding: "rounded-lg",
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
description: "Dynamic company logo using company query",
|
|
234
|
+
type: "image",
|
|
235
|
+
props: {
|
|
236
|
+
image: {
|
|
237
|
+
src: "{{company.logo}}",
|
|
238
|
+
alt: "{{company.name}} logo",
|
|
239
|
+
},
|
|
240
|
+
padding: "2rem",
|
|
241
|
+
shadow: "shadow-sm",
|
|
242
|
+
colorPreset: { color: "neutral-100" },
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
description: "Dynamic event banner using event query",
|
|
247
|
+
type: "image",
|
|
248
|
+
props: {
|
|
249
|
+
image: {
|
|
250
|
+
src: "{{event.bannerImage}}",
|
|
251
|
+
alt: "{{event.title}} event banner",
|
|
252
|
+
},
|
|
253
|
+
shadow: "shadow-xl",
|
|
254
|
+
rounding: "rounded-xl",
|
|
255
|
+
author: {
|
|
256
|
+
name: "{{event.photographer}}",
|
|
257
|
+
url: "{{event.photographerProfile}}",
|
|
258
|
+
},
|
|
259
|
+
provider: "event-photography",
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
description: "Dynamic article featured image using article query",
|
|
264
|
+
type: "image",
|
|
265
|
+
props: {
|
|
266
|
+
image: {
|
|
267
|
+
src: "{{article.featuredImage}}",
|
|
268
|
+
alt: "Featured image for {{article.title}}",
|
|
269
|
+
},
|
|
270
|
+
author: {
|
|
271
|
+
name: "{{article.imageCredit}}",
|
|
272
|
+
url: "{{article.imageCreditUrl}}",
|
|
273
|
+
},
|
|
274
|
+
provider: "{{article.imageProvider}}",
|
|
275
|
+
shadow: "shadow-md",
|
|
276
|
+
rounding: "rounded-lg",
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
description: "Dynamic property photo using property query",
|
|
281
|
+
type: "image",
|
|
282
|
+
props: {
|
|
283
|
+
image: {
|
|
284
|
+
src: "{{property.mainPhoto}}",
|
|
285
|
+
alt: "{{property.address}} - {{property.propertyType}}",
|
|
286
|
+
},
|
|
287
|
+
shadow: "shadow-lg",
|
|
288
|
+
rounding: "rounded-xl",
|
|
289
|
+
colorPreset: { color: "primary-50" },
|
|
290
|
+
padding: "1rem",
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
description: "Dynamic portfolio piece using portfolio query",
|
|
295
|
+
type: "image",
|
|
296
|
+
props: {
|
|
297
|
+
image: {
|
|
298
|
+
src: "{{portfolio.imageUrl}}",
|
|
299
|
+
alt: "{{portfolio.projectName}} for {{portfolio.clientName}}",
|
|
300
|
+
},
|
|
301
|
+
author: {
|
|
302
|
+
name: "{{portfolio.photographer}}",
|
|
303
|
+
url: "{{portfolio.photographerWebsite}}",
|
|
304
|
+
},
|
|
305
|
+
provider: "portfolio-assets",
|
|
306
|
+
shadow: "shadow-md",
|
|
307
|
+
rounding: "rounded-lg",
|
|
308
|
+
padding: "0.5rem",
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
description: "Dynamic service illustration using service query",
|
|
313
|
+
type: "image",
|
|
314
|
+
props: {
|
|
315
|
+
image: {
|
|
316
|
+
src: "{{service.illustration}}",
|
|
317
|
+
alt: "{{service.name}} service illustration",
|
|
318
|
+
},
|
|
319
|
+
colorPreset: { color: "secondary-100" },
|
|
320
|
+
padding: "2rem",
|
|
321
|
+
shadow: "shadow-sm",
|
|
322
|
+
rounding: "rounded-full",
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
description: "Dynamic testimonial customer photo using testimonial query",
|
|
327
|
+
type: "image",
|
|
328
|
+
props: {
|
|
329
|
+
image: {
|
|
330
|
+
src: "{{testimonial.customerPhoto}}",
|
|
331
|
+
alt: "{{testimonial.customerName}} from {{testimonial.company}}",
|
|
332
|
+
},
|
|
333
|
+
rounding: "rounded-full",
|
|
334
|
+
shadow: "shadow-lg",
|
|
335
|
+
padding: "0.25rem",
|
|
336
|
+
colorPreset: { color: "accent-50" },
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
description: "Product gallery using products query with loop",
|
|
341
|
+
type: "image",
|
|
342
|
+
props: {
|
|
343
|
+
image: {
|
|
344
|
+
src: "{{products.mainImage}}",
|
|
345
|
+
alt: "{{products.name}} - {{products.category}}",
|
|
346
|
+
},
|
|
347
|
+
author: {
|
|
348
|
+
name: "{{products.photographer}}",
|
|
349
|
+
url: "{{products.photographerUrl}}",
|
|
350
|
+
},
|
|
351
|
+
provider: "product-catalog",
|
|
352
|
+
shadow: "shadow-md",
|
|
353
|
+
rounding: "rounded-lg",
|
|
354
|
+
padding: "0.5rem",
|
|
355
|
+
colorPreset: { color: "primary-50" },
|
|
356
|
+
loop: {
|
|
357
|
+
over: "products",
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
description: "Team member photos using teamMembers query with loop",
|
|
363
|
+
type: "image",
|
|
364
|
+
props: {
|
|
365
|
+
image: {
|
|
366
|
+
src: "{{teamMembers.profilePhoto}}",
|
|
367
|
+
alt: "{{teamMembers.fullName}} - {{teamMembers.position}}",
|
|
368
|
+
},
|
|
369
|
+
rounding: "rounded-full",
|
|
370
|
+
shadow: "shadow-lg",
|
|
371
|
+
padding: "0.75rem",
|
|
372
|
+
colorPreset: { color: "secondary-100" },
|
|
373
|
+
loop: {
|
|
374
|
+
over: "teamMembers",
|
|
375
|
+
},
|
|
376
|
+
},
|
|
377
|
+
},
|
|
378
|
+
];
|