@upstart.gg/sdk 0.0.130 → 0.0.131
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 +164 -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-4GIZ6WSG.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-COT2ROEH.js +34 -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-GXNHF6J5.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-L2HOZVBC.js +3 -0
- package/dist/shared/chunk-LEWKHCRI.js +3 -0
- package/dist/shared/chunk-LT4CW2F7.js +3 -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-NXIF3UMD.js +3 -0
- package/dist/shared/chunk-PW5HRVMD.js +3 -0
- package/dist/shared/chunk-PZYX3ACO.js +3 -0
- package/dist/shared/chunk-QDJQAZIA.js +8 -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-TCTVRT4O.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-VE3S4LGT.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-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 +151 -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,390 @@
|
|
|
1
|
+
import { type Static, type ObjectOptions, Type, type StringOptions, TObject } from "@sinclair/typebox";
|
|
2
|
+
import { StringEnum } from "~/shared/utils/string-enum";
|
|
3
|
+
import { typedRef } from "~/shared/utils/typed-ref";
|
|
4
|
+
|
|
5
|
+
type ColorPresetOptions = ObjectOptions & {
|
|
6
|
+
"ui:presets"?: Record<string, { className: string; label: string }>;
|
|
7
|
+
"ui:default-gradient-direction"?: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const colorPresets: NonNullable<ColorPresetOptions["ui:presets"]> = {
|
|
11
|
+
"primary-50": {
|
|
12
|
+
className: "bg-primary-50 text-primary-50-content",
|
|
13
|
+
label: "Primary 50",
|
|
14
|
+
},
|
|
15
|
+
"primary-100": {
|
|
16
|
+
className: "bg-primary-100 text-primary-100-content",
|
|
17
|
+
label: "Primary 100",
|
|
18
|
+
},
|
|
19
|
+
"primary-200": {
|
|
20
|
+
className: "bg-primary-200 text-primary-200-content",
|
|
21
|
+
label: "Primary 200",
|
|
22
|
+
},
|
|
23
|
+
"primary-300": {
|
|
24
|
+
className: "bg-primary-300 text-primary-300-content",
|
|
25
|
+
label: "Primary 300",
|
|
26
|
+
},
|
|
27
|
+
"primary-400": {
|
|
28
|
+
className: "bg-primary-400 text-primary-400-content",
|
|
29
|
+
label: "Primary 400",
|
|
30
|
+
},
|
|
31
|
+
"primary-500": {
|
|
32
|
+
className: "bg-primary-500 text-primary-500-content",
|
|
33
|
+
label: "Primary 500",
|
|
34
|
+
},
|
|
35
|
+
"primary-600": {
|
|
36
|
+
className: "bg-primary-600 text-primary-600-content",
|
|
37
|
+
label: "Primary 600",
|
|
38
|
+
},
|
|
39
|
+
"primary-700": {
|
|
40
|
+
className: "bg-primary-700 text-primary-700-content",
|
|
41
|
+
label: "Primary 700",
|
|
42
|
+
},
|
|
43
|
+
"primary-800": {
|
|
44
|
+
className: "bg-primary-800 text-primary-800-content",
|
|
45
|
+
label: "Primary 800",
|
|
46
|
+
},
|
|
47
|
+
"primary-900": {
|
|
48
|
+
className: "bg-primary-900 text-primary-900-content",
|
|
49
|
+
label: "Primary 900",
|
|
50
|
+
},
|
|
51
|
+
"secondary-50": {
|
|
52
|
+
className: "bg-secondary-50 text-secondary-50-content",
|
|
53
|
+
label: "Secondary 50",
|
|
54
|
+
},
|
|
55
|
+
"secondary-100": {
|
|
56
|
+
className: "bg-secondary-100 text-secondary-100-content",
|
|
57
|
+
label: "Secondary 100",
|
|
58
|
+
},
|
|
59
|
+
"secondary-200": {
|
|
60
|
+
className: "bg-secondary-200 text-secondary-200-content",
|
|
61
|
+
label: "Secondary 200",
|
|
62
|
+
},
|
|
63
|
+
"secondary-300": {
|
|
64
|
+
className: "bg-secondary-300 text-secondary-300-content",
|
|
65
|
+
label: "Secondary 300",
|
|
66
|
+
},
|
|
67
|
+
"secondary-400": {
|
|
68
|
+
className: "bg-secondary-400 text-secondary-400-content",
|
|
69
|
+
label: "Secondary 400",
|
|
70
|
+
},
|
|
71
|
+
"secondary-500": {
|
|
72
|
+
className: "bg-secondary-500 text-secondary-500-content",
|
|
73
|
+
label: "Secondary 500",
|
|
74
|
+
},
|
|
75
|
+
"secondary-600": {
|
|
76
|
+
className: "bg-secondary-600 text-secondary-600-content",
|
|
77
|
+
label: "Secondary 600",
|
|
78
|
+
},
|
|
79
|
+
"secondary-700": {
|
|
80
|
+
className: "bg-secondary-700 text-secondary-700-content",
|
|
81
|
+
label: "Secondary 700",
|
|
82
|
+
},
|
|
83
|
+
"secondary-800": {
|
|
84
|
+
className: "bg-secondary-800 text-secondary-800-content",
|
|
85
|
+
label: "Secondary 800",
|
|
86
|
+
},
|
|
87
|
+
"secondary-900": {
|
|
88
|
+
className: "bg-secondary-900 text-secondary-900-content",
|
|
89
|
+
label: "Secondary 900",
|
|
90
|
+
},
|
|
91
|
+
"accent-50": {
|
|
92
|
+
className: "bg-accent-50 text-accent-50-content",
|
|
93
|
+
label: "Accent 50",
|
|
94
|
+
},
|
|
95
|
+
"accent-100": {
|
|
96
|
+
className: "bg-accent-100 text-accent-100-content",
|
|
97
|
+
label: "Accent 100",
|
|
98
|
+
},
|
|
99
|
+
"accent-200": {
|
|
100
|
+
className: "bg-accent-200 text-accent-200-content",
|
|
101
|
+
label: "Accent 200",
|
|
102
|
+
},
|
|
103
|
+
"accent-300": {
|
|
104
|
+
className: "bg-accent-300 text-accent-300-content",
|
|
105
|
+
label: "Accent 300",
|
|
106
|
+
},
|
|
107
|
+
"accent-400": {
|
|
108
|
+
className: "bg-accent-400 text-accent-400-content",
|
|
109
|
+
label: "Accent 400",
|
|
110
|
+
},
|
|
111
|
+
"accent-500": {
|
|
112
|
+
className: "bg-accent-500 text-accent-500-content",
|
|
113
|
+
label: "Accent 500",
|
|
114
|
+
},
|
|
115
|
+
"accent-600": {
|
|
116
|
+
className: "bg-accent-600 text-accent-600-content",
|
|
117
|
+
label: "Accent 600",
|
|
118
|
+
},
|
|
119
|
+
"accent-700": {
|
|
120
|
+
className: "bg-accent-700 text-accent-700-content",
|
|
121
|
+
label: "Accent 700",
|
|
122
|
+
},
|
|
123
|
+
"accent-800": {
|
|
124
|
+
className: "bg-accent-800 text-accent-800-content",
|
|
125
|
+
label: "Accent 800",
|
|
126
|
+
},
|
|
127
|
+
"accent-900": {
|
|
128
|
+
className: "bg-accent-900 text-accent-900-content",
|
|
129
|
+
label: "Accent 900",
|
|
130
|
+
},
|
|
131
|
+
"neutral-50": {
|
|
132
|
+
className: "bg-neutral-50 text-neutral-50-content",
|
|
133
|
+
label: "Neutral 50",
|
|
134
|
+
},
|
|
135
|
+
"neutral-100": {
|
|
136
|
+
className: "bg-neutral-100 text-neutral-100-content",
|
|
137
|
+
label: "Neutral 100",
|
|
138
|
+
},
|
|
139
|
+
"neutral-200": {
|
|
140
|
+
className: "bg-neutral-200 text-neutral-200-content",
|
|
141
|
+
label: "Neutral 200",
|
|
142
|
+
},
|
|
143
|
+
"neutral-300": {
|
|
144
|
+
className: "bg-neutral-300 text-neutral-300-content",
|
|
145
|
+
label: "Neutral 300",
|
|
146
|
+
},
|
|
147
|
+
"neutral-400": {
|
|
148
|
+
className: "bg-neutral-400 text-neutral-400-content",
|
|
149
|
+
label: "Neutral 400",
|
|
150
|
+
},
|
|
151
|
+
"neutral-500": {
|
|
152
|
+
className: "bg-neutral-500 text-neutral-500-content",
|
|
153
|
+
label: "Neutral 500",
|
|
154
|
+
},
|
|
155
|
+
"neutral-600": {
|
|
156
|
+
className: "bg-neutral-600 text-neutral-600-content",
|
|
157
|
+
label: "Neutral 600",
|
|
158
|
+
},
|
|
159
|
+
"neutral-700": {
|
|
160
|
+
className: "bg-neutral-700 text-neutral-700-content",
|
|
161
|
+
label: "Neutral 700",
|
|
162
|
+
},
|
|
163
|
+
"neutral-800": {
|
|
164
|
+
className: "bg-neutral-800 text-neutral-800-content",
|
|
165
|
+
label: "Neutral 800",
|
|
166
|
+
},
|
|
167
|
+
"neutral-900": {
|
|
168
|
+
className: "bg-neutral-900 text-neutral-900-content",
|
|
169
|
+
label: "Neutral 900",
|
|
170
|
+
},
|
|
171
|
+
"base-100": {
|
|
172
|
+
className: "bg-base-100 text-base-100-content",
|
|
173
|
+
label: "Base 100",
|
|
174
|
+
},
|
|
175
|
+
"base-200": {
|
|
176
|
+
className: "bg-base-200 text-base-200-content",
|
|
177
|
+
label: "Base 200",
|
|
178
|
+
},
|
|
179
|
+
"base-300": {
|
|
180
|
+
className: "bg-base-300 text-base-300-content",
|
|
181
|
+
label: "Base 300",
|
|
182
|
+
},
|
|
183
|
+
"primary-gradient-100": {
|
|
184
|
+
className: "from-primary-100 to-primary-200 text-primary-100-content",
|
|
185
|
+
label: "Primary gradient 1",
|
|
186
|
+
},
|
|
187
|
+
"primary-gradient-200": {
|
|
188
|
+
className: "from-primary-200 to-primary-300 text-primary-200-content",
|
|
189
|
+
label: "Primary gradient 2",
|
|
190
|
+
},
|
|
191
|
+
"primary-gradient-300": {
|
|
192
|
+
className: "from-primary-300 to-primary-400 text-primary-300-content",
|
|
193
|
+
label: "Primary gradient 3",
|
|
194
|
+
},
|
|
195
|
+
"primary-gradient-400": {
|
|
196
|
+
className: "from-primary-400 to-primary-500 text-primary-400-content",
|
|
197
|
+
label: "Primary gradient 4",
|
|
198
|
+
},
|
|
199
|
+
"primary-gradient-500": {
|
|
200
|
+
className: "from-primary-500 to-primary-600 text-primary-500-content",
|
|
201
|
+
label: "Primary gradient 5",
|
|
202
|
+
},
|
|
203
|
+
"primary-gradient-600": {
|
|
204
|
+
className: "from-primary-600 to-primary-700 text-primary-600-content",
|
|
205
|
+
label: "Primary gradient 6",
|
|
206
|
+
},
|
|
207
|
+
"primary-gradient-700": {
|
|
208
|
+
className: "from-primary-700 to-primary-800 text-primary-700-content",
|
|
209
|
+
label: "Primary gradient 7",
|
|
210
|
+
},
|
|
211
|
+
"primary-gradient-800": {
|
|
212
|
+
className: "from-primary-800 to-primary-900 text-primary-800-content",
|
|
213
|
+
label: "Primary gradient 8",
|
|
214
|
+
},
|
|
215
|
+
"secondary-gradient-100": {
|
|
216
|
+
className: "from-secondary-100 to-secondary-200 text-secondary-100-content",
|
|
217
|
+
label: "Secondary gradient 1",
|
|
218
|
+
},
|
|
219
|
+
"secondary-gradient-200": {
|
|
220
|
+
className: "from-secondary-200 to-secondary-300 text-secondary-200-content",
|
|
221
|
+
label: "Secondary gradient 2",
|
|
222
|
+
},
|
|
223
|
+
"secondary-gradient-300": {
|
|
224
|
+
className: "from-secondary-300 to-secondary-400 text-secondary-300-content",
|
|
225
|
+
label: "Secondary gradient 3",
|
|
226
|
+
},
|
|
227
|
+
"secondary-gradient-400": {
|
|
228
|
+
className: "from-secondary-400 to-secondary-500 text-secondary-400-content",
|
|
229
|
+
label: "Secondary gradient 4",
|
|
230
|
+
},
|
|
231
|
+
"secondary-gradient-500": {
|
|
232
|
+
className: "from-secondary-500 to-secondary-600 text-secondary-500-content",
|
|
233
|
+
label: "Secondary gradient 5",
|
|
234
|
+
},
|
|
235
|
+
"secondary-gradient-600": {
|
|
236
|
+
className: "from-secondary-600 to-secondary-700 text-secondary-600-content",
|
|
237
|
+
label: "Secondary gradient 6",
|
|
238
|
+
},
|
|
239
|
+
"secondary-gradient-700": {
|
|
240
|
+
className: "from-secondary-700 to-secondary-800 text-secondary-700-content",
|
|
241
|
+
label: "Secondary gradient 7",
|
|
242
|
+
},
|
|
243
|
+
"secondary-gradient-800": {
|
|
244
|
+
className: "from-secondary-800 to-secondary-900 text-secondary-800-content",
|
|
245
|
+
label: "Secondary gradient 8",
|
|
246
|
+
},
|
|
247
|
+
"accent-gradient-100": {
|
|
248
|
+
className: "from-accent-100 to-accent-200 text-accent-100-content",
|
|
249
|
+
label: "Accent gradient 1",
|
|
250
|
+
},
|
|
251
|
+
"accent-gradient-200": {
|
|
252
|
+
className: "from-accent-200 to-accent-300 text-accent-200-content",
|
|
253
|
+
label: "Accent gradient 2",
|
|
254
|
+
},
|
|
255
|
+
"accent-gradient-300": {
|
|
256
|
+
className: "from-accent-300 to-accent-400 text-accent-300-content",
|
|
257
|
+
label: "Accent gradient 3",
|
|
258
|
+
},
|
|
259
|
+
"accent-gradient-400": {
|
|
260
|
+
className: "from-accent-400 to-accent-500 text-accent-400-content",
|
|
261
|
+
label: "Accent gradient 4",
|
|
262
|
+
},
|
|
263
|
+
"accent-gradient-500": {
|
|
264
|
+
className: "from-accent-500 to-accent-600 text-accent-500-content",
|
|
265
|
+
label: "Accent gradient 5",
|
|
266
|
+
},
|
|
267
|
+
"accent-gradient-600": {
|
|
268
|
+
className: "from-accent-600 to-accent-700 text-accent-600-content",
|
|
269
|
+
label: "Accent gradient 6",
|
|
270
|
+
},
|
|
271
|
+
"accent-gradient-700": {
|
|
272
|
+
className: "from-accent-700 to-accent-800 text-accent-700-content",
|
|
273
|
+
label: "Accent gradient 7",
|
|
274
|
+
},
|
|
275
|
+
"accent-gradient-800": {
|
|
276
|
+
className: "from-accent-800 to-accent-900 text-accent-800-content",
|
|
277
|
+
label: "Accent gradient 8",
|
|
278
|
+
},
|
|
279
|
+
"neutral-gradient-100": {
|
|
280
|
+
className: "from-neutral-100 to-neutral-200 text-neutral-100-content",
|
|
281
|
+
label: "Neutral gradient 1",
|
|
282
|
+
},
|
|
283
|
+
"neutral-gradient-200": {
|
|
284
|
+
className: "from-neutral-200 to-neutral-300 text-neutral-200-content",
|
|
285
|
+
label: "Neutral gradient 2",
|
|
286
|
+
},
|
|
287
|
+
"neutral-gradient-300": {
|
|
288
|
+
className: "from-neutral-300 to-neutral-400 text-neutral-300-content",
|
|
289
|
+
label: "Neutral gradient 3",
|
|
290
|
+
},
|
|
291
|
+
"neutral-gradient-400": {
|
|
292
|
+
className: "from-neutral-400 to-neutral-500 text-neutral-400-content",
|
|
293
|
+
label: "Neutral gradient 4",
|
|
294
|
+
},
|
|
295
|
+
"neutral-gradient-500": {
|
|
296
|
+
className: "from-neutral-500 to-neutral-600 text-neutral-500-content",
|
|
297
|
+
label: "Neutral gradient 5",
|
|
298
|
+
},
|
|
299
|
+
"neutral-gradient-600": {
|
|
300
|
+
className: "from-neutral-600 to-neutral-700 text-neutral-600-content",
|
|
301
|
+
label: "Neutral gradient 6",
|
|
302
|
+
},
|
|
303
|
+
"neutral-gradient-700": {
|
|
304
|
+
className: "from-neutral-700 to-neutral-800 text-neutral-700-content",
|
|
305
|
+
label: "Neutral gradient 7",
|
|
306
|
+
},
|
|
307
|
+
"neutral-gradient-800": {
|
|
308
|
+
className: "from-neutral-800 to-neutral-900 text-neutral-800-content",
|
|
309
|
+
label: "Neutral gradient 8",
|
|
310
|
+
},
|
|
311
|
+
"base-gradient-100": {
|
|
312
|
+
className: "from-base-100 to-base-200 text-base-100-content",
|
|
313
|
+
label: "Base gradient 1",
|
|
314
|
+
},
|
|
315
|
+
"base-gradient-200": {
|
|
316
|
+
className: "from-base-200 to-base-300 text-base-200-content",
|
|
317
|
+
label: "Base gradient 2",
|
|
318
|
+
},
|
|
319
|
+
none: {
|
|
320
|
+
className: "",
|
|
321
|
+
label: "None",
|
|
322
|
+
},
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
export function colorPreset(options: ColorPresetOptions = {}) {
|
|
326
|
+
return Type.Object(
|
|
327
|
+
{
|
|
328
|
+
color: StringEnum(Object.keys(colorPresets), {
|
|
329
|
+
title: "Color preset",
|
|
330
|
+
description: "Color preset to apply to background and text",
|
|
331
|
+
enumNames: Object.keys(colorPresets).map((key) => colorPresets[key].label),
|
|
332
|
+
"ai:instructions": `Presets are predefined color combinations of background and text colors that can be applied to elements. They include various shades of primary, secondary, accent, and neutral colors, as well as gradients. You can also select 'none' to remove any preset.`,
|
|
333
|
+
"ui:styleId": "presets:color",
|
|
334
|
+
"ui:responsive": true,
|
|
335
|
+
default: options.default?.color,
|
|
336
|
+
}),
|
|
337
|
+
gradientDirection: Type.Optional(gradientDirection(options)),
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"ui:field": "color-preset",
|
|
341
|
+
// $id: "presets:color",
|
|
342
|
+
title: "Color preset",
|
|
343
|
+
"ui:presets": colorPresets,
|
|
344
|
+
default: options.default,
|
|
345
|
+
examples: [
|
|
346
|
+
{ color: "primary-500" },
|
|
347
|
+
{ color: "secondary-500" },
|
|
348
|
+
{ color: "accent-800", gradientDirection: "bg-gradient-to-t" },
|
|
349
|
+
],
|
|
350
|
+
"ui:default-gradient-direction": options["ui:default-gradient-direction"] ?? "bg-gradient-to-br",
|
|
351
|
+
},
|
|
352
|
+
);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export type ColorPresetSettings = Static<ReturnType<typeof colorPreset>>;
|
|
356
|
+
|
|
357
|
+
export function colorPresetRef(options: ColorPresetOptions = {}) {
|
|
358
|
+
return typedRef("presets:color", options);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
function gradientDirection(options: StringOptions = {}) {
|
|
362
|
+
return StringEnum(
|
|
363
|
+
[
|
|
364
|
+
"bg-gradient-to-t",
|
|
365
|
+
"bg-gradient-to-r",
|
|
366
|
+
"bg-gradient-to-b",
|
|
367
|
+
"bg-gradient-to-l",
|
|
368
|
+
"bg-gradient-to-tl",
|
|
369
|
+
"bg-gradient-to-tr",
|
|
370
|
+
"bg-gradient-to-br",
|
|
371
|
+
"bg-gradient-to-bl",
|
|
372
|
+
],
|
|
373
|
+
{
|
|
374
|
+
title: "Gradient direction",
|
|
375
|
+
description: "The direction of the gradient. Only applies when color preset is a gradient.",
|
|
376
|
+
enumNames: ["Top", "Right", "Bottom", "Left", "Top left", "Top right", "Bottom right", "Bottom left"],
|
|
377
|
+
default: "bg-gradient-to-br",
|
|
378
|
+
"ui:responsive": "desktop",
|
|
379
|
+
"ui:styleId": "styles:gradientDirection",
|
|
380
|
+
// metadata: {
|
|
381
|
+
// filter: (manifestProps: TObject, formData: Static<BrickManifest["props"]>) => {
|
|
382
|
+
// return (formData[colorPropKey] as string)?.includes("gradient") === true;
|
|
383
|
+
// },
|
|
384
|
+
// },
|
|
385
|
+
...options,
|
|
386
|
+
},
|
|
387
|
+
);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export type GradientDirectionSettings = Static<ReturnType<typeof gradientDirection>>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type SchemaOptions, type Static, type StringOptions, type TObject, Type } from "@sinclair/typebox";
|
|
2
|
+
import { typedRef } from "~/shared/utils/typed-ref";
|
|
3
|
+
|
|
4
|
+
export function color(defaultValue?: string, title = "Text color") {
|
|
5
|
+
return Type.String({
|
|
6
|
+
title,
|
|
7
|
+
// $id: "styles:color",
|
|
8
|
+
"ai:instructions":
|
|
9
|
+
"hex/rgb/rgba color or classes like `text-<variant>-<shade>`, variants being `primary`, `secondary`, `accent` and `neutral`, and shades between 50 and 900",
|
|
10
|
+
default: defaultValue,
|
|
11
|
+
"ui:styleId": "styles:color",
|
|
12
|
+
"ui:field": "color",
|
|
13
|
+
"ui:color-type": "text",
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type ColorSettings = Static<ReturnType<typeof color>>;
|
|
18
|
+
|
|
19
|
+
export function colorRef(options: SchemaOptions = {}) {
|
|
20
|
+
return typedRef("styles:color", { ...options, "ui:styleId": "styles:color" });
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function borderColor(defaultValue?: string, title = "Border color") {
|
|
24
|
+
return Type.String({
|
|
25
|
+
title,
|
|
26
|
+
// $id: "styles:borderColor",
|
|
27
|
+
"ai:instructions":
|
|
28
|
+
"hex/rgb/rgba color or classes like `border-<variant>-<shade>`, variants being `primary`, `secondary`, `accent` and `neutral`, and shades between 50 and 900",
|
|
29
|
+
default: defaultValue,
|
|
30
|
+
"ui:styleId": "styles:borderColor",
|
|
31
|
+
"ui:field": "color",
|
|
32
|
+
"ui:color-type": "border",
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type BorderColorSettings = Static<ReturnType<typeof borderColor>>;
|
|
37
|
+
|
|
38
|
+
export function borderColorRef(options: SchemaOptions = {}) {
|
|
39
|
+
return typedRef("styles:borderColor", { ...options, "ui:styleId": "styles:borderColor" });
|
|
40
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { type Static, type TString, Type } from "@sinclair/typebox";
|
|
2
|
+
import { typedRef } from "~/shared/utils/typed-ref";
|
|
3
|
+
import { cssLengthRef } from "./css-length";
|
|
4
|
+
import { alignSelfRef } from "./align";
|
|
5
|
+
|
|
6
|
+
export function hidden() {
|
|
7
|
+
return Type.Object(
|
|
8
|
+
{
|
|
9
|
+
desktop: Type.Optional(Type.Boolean()),
|
|
10
|
+
mobile: Type.Optional(Type.Boolean()),
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
// $id: "styles:hidden",
|
|
14
|
+
title: "Hidden",
|
|
15
|
+
description: "Used to hide the brick on desktop or mobile.",
|
|
16
|
+
"ui:field": "hidden",
|
|
17
|
+
},
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const commonProps = {
|
|
22
|
+
lastTouched: Type.Optional(
|
|
23
|
+
Type.Number({
|
|
24
|
+
"ui:field": "hidden",
|
|
25
|
+
"ai:hidden": true,
|
|
26
|
+
}),
|
|
27
|
+
),
|
|
28
|
+
hidden: Type.Optional(typedRef("styles:hidden")),
|
|
29
|
+
editable: Type.Optional(
|
|
30
|
+
Type.Boolean({
|
|
31
|
+
"ui:field": "hidden",
|
|
32
|
+
"ai:hidden": true,
|
|
33
|
+
}),
|
|
34
|
+
),
|
|
35
|
+
width: Type.Optional(
|
|
36
|
+
cssLengthRef({
|
|
37
|
+
title: "Fixed Width",
|
|
38
|
+
description:
|
|
39
|
+
"Set a fixed width for the brick. If not set, the brick will be responsive and will follow the flex layout of its parent section.",
|
|
40
|
+
"ai:instructions": "Use percentage values to make the width responsive, like '50%'",
|
|
41
|
+
"ui:field": "hidden",
|
|
42
|
+
}) as TString,
|
|
43
|
+
),
|
|
44
|
+
height: Type.Optional(
|
|
45
|
+
cssLengthRef({
|
|
46
|
+
title: "Fixed height",
|
|
47
|
+
description:
|
|
48
|
+
"Set a fixed height for the brick. If not set, the brick will be responsive and will follow the flex layout of its parent section.",
|
|
49
|
+
"ui:field": "hidden",
|
|
50
|
+
}),
|
|
51
|
+
),
|
|
52
|
+
grow: Type.Optional(
|
|
53
|
+
Type.Boolean({
|
|
54
|
+
title: "Auto expand",
|
|
55
|
+
description: "If set, the brick will grow to fill the available space of its parent section or box.",
|
|
56
|
+
"ui:styleId": "styles:grow",
|
|
57
|
+
"ui:responsive": true,
|
|
58
|
+
}),
|
|
59
|
+
),
|
|
60
|
+
alignSelf: Type.Optional(alignSelfRef()),
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const commonPropsSchema = Type.Object(commonProps);
|
|
64
|
+
export type CommonBrickProps = Static<typeof commonPropsSchema>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type Static, Type, type StringOptions } from "@sinclair/typebox";
|
|
2
|
+
import { typedRef } from "~/shared/utils/typed-ref";
|
|
3
|
+
|
|
4
|
+
export const cssUnits = ["px", "%", "em", "rem", "vh", "vw", "dvh", "dvw", "rlh", "lh", "cqh", "cqw"];
|
|
5
|
+
|
|
6
|
+
export function cssLength(options: StringOptions = {}) {
|
|
7
|
+
return Type.String({
|
|
8
|
+
title: "Length",
|
|
9
|
+
// $id: "styles:cssLength",
|
|
10
|
+
description: `A CSS length value. Must be a number with a unit (e.g. "10px", "50%"). The unit can be one of the following: ${cssUnits?.join(", ")}.`,
|
|
11
|
+
default: options.default,
|
|
12
|
+
"ui:field": "css-length",
|
|
13
|
+
"ui:css-units": cssUnits,
|
|
14
|
+
examples: ["100px", "50%", "2em", "1.5rem"],
|
|
15
|
+
...options,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type CssLength = Static<ReturnType<typeof cssLength>>;
|
|
20
|
+
|
|
21
|
+
export function cssLengthRef(options: StringOptions = {}) {
|
|
22
|
+
return typedRef("styles:cssLength", options);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function isCssLength(value: string | number | undefined): boolean {
|
|
26
|
+
if (typeof value !== "string") {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
// Check if the value is something like a number + a css unit (e.g., "20px", "50%")
|
|
30
|
+
const cssLengthPattern = new RegExp(`^-?\\d+(?:\\.\\d+)?\\s*(${cssUnits.join("|")})$`);
|
|
31
|
+
return cssLengthPattern.test(value);
|
|
32
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Static, Type, type StringOptions } from "@sinclair/typebox";
|
|
2
|
+
|
|
3
|
+
export function datarecord(title = "Database", options?: StringOptions) {
|
|
4
|
+
return Type.String({
|
|
5
|
+
"ui:field": "datarecord",
|
|
6
|
+
title,
|
|
7
|
+
...options,
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type DatarecordSettings = Static<ReturnType<typeof datarecord>>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Type, type Static } from "@sinclair/typebox";
|
|
2
|
+
import { StringEnum } from "~/shared/utils/string-enum";
|
|
3
|
+
|
|
4
|
+
export function datasource(title = "Database") {
|
|
5
|
+
return Type.Object(
|
|
6
|
+
{
|
|
7
|
+
id: Type.String({
|
|
8
|
+
title: "Database",
|
|
9
|
+
}),
|
|
10
|
+
offset: Type.Optional(
|
|
11
|
+
Type.Number({
|
|
12
|
+
title: "Offset",
|
|
13
|
+
description: "Offset the records to fetch from the datasource",
|
|
14
|
+
minimum: 0,
|
|
15
|
+
default: 0,
|
|
16
|
+
}),
|
|
17
|
+
),
|
|
18
|
+
limit: Type.Optional(
|
|
19
|
+
Type.Number({
|
|
20
|
+
title: "Limit",
|
|
21
|
+
description:
|
|
22
|
+
"Limit the number of records to fetch from the datasource. Setting to 1 will fetch and render only one item.",
|
|
23
|
+
minimum: 1,
|
|
24
|
+
default: 3,
|
|
25
|
+
}),
|
|
26
|
+
),
|
|
27
|
+
sortDirection: Type.Optional(
|
|
28
|
+
StringEnum(["asc", "desc"], {
|
|
29
|
+
title: "Sort",
|
|
30
|
+
enumNames: ["Ascending", "Descending"],
|
|
31
|
+
description: "Direction to sort the records by",
|
|
32
|
+
default: "desc",
|
|
33
|
+
}),
|
|
34
|
+
),
|
|
35
|
+
sortField: Type.Optional(
|
|
36
|
+
Type.String({
|
|
37
|
+
title: "Sort Field",
|
|
38
|
+
description: "Select a field to sort by (must be indexed)",
|
|
39
|
+
default: "$publicationDate",
|
|
40
|
+
}),
|
|
41
|
+
),
|
|
42
|
+
filters: Type.Optional(
|
|
43
|
+
Type.Array(
|
|
44
|
+
Type.Object({
|
|
45
|
+
field: Type.String(),
|
|
46
|
+
op: StringEnum([
|
|
47
|
+
"eq",
|
|
48
|
+
"ne",
|
|
49
|
+
"lt",
|
|
50
|
+
"lte",
|
|
51
|
+
"gt",
|
|
52
|
+
"gte",
|
|
53
|
+
"in",
|
|
54
|
+
"nin",
|
|
55
|
+
"contains",
|
|
56
|
+
"notContains",
|
|
57
|
+
"startsWith",
|
|
58
|
+
"notStartsWith",
|
|
59
|
+
"endsWith",
|
|
60
|
+
"notEndsWith",
|
|
61
|
+
"before",
|
|
62
|
+
"after",
|
|
63
|
+
]),
|
|
64
|
+
value: Type.Union([Type.String(), Type.Number(), Type.Boolean()]),
|
|
65
|
+
}),
|
|
66
|
+
{
|
|
67
|
+
default: [],
|
|
68
|
+
},
|
|
69
|
+
),
|
|
70
|
+
),
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"ui:field": "datasource",
|
|
74
|
+
title,
|
|
75
|
+
metadata: {
|
|
76
|
+
category: "content",
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type DatasourceSettings = Static<ReturnType<typeof datasource>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Type, type StringOptions } from "@sinclair/typebox";
|
|
2
|
+
|
|
3
|
+
export function date(title = "Date", options?: StringOptions) {
|
|
4
|
+
return Type.String({
|
|
5
|
+
title,
|
|
6
|
+
format: "date",
|
|
7
|
+
"ui:field": "date",
|
|
8
|
+
examples: ["2023-03-15"],
|
|
9
|
+
...options,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function datetime(title = "Date and Time", options?: StringOptions) {
|
|
14
|
+
return Type.String({
|
|
15
|
+
title,
|
|
16
|
+
format: "date-time",
|
|
17
|
+
"ui:field": "datetime",
|
|
18
|
+
examples: ["2023-03-15T12:00:00Z"],
|
|
19
|
+
...options,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type SchemaOptions, type Static, type StringOptions, Type } from "@sinclair/typebox";
|
|
2
|
+
import { StringEnum } from "~/shared/utils/string-enum";
|
|
3
|
+
import { typedRef } from "~/shared/utils/typed-ref";
|
|
4
|
+
|
|
5
|
+
export function direction(options: StringOptions = {}) {
|
|
6
|
+
return StringEnum(["flex-row", "flex-col"], {
|
|
7
|
+
title: "Direction",
|
|
8
|
+
description: "The direction of the layout",
|
|
9
|
+
enumNames: ["Horizontal", "Vertical"],
|
|
10
|
+
// $id: "styles:direction",
|
|
11
|
+
"ui:styleId": "styles:direction",
|
|
12
|
+
examples: ["flex-row", "flex-col"],
|
|
13
|
+
...options,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type DirectionSettings = Static<ReturnType<typeof direction>>;
|
|
18
|
+
|
|
19
|
+
export function directionRef(options: SchemaOptions = {}) {
|
|
20
|
+
return typedRef("styles:direction", options);
|
|
21
|
+
}
|