@upstart.gg/sdk 0.0.135 → 0.0.137
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 +11 -2
- package/dist/shared/ai/schemas.d.ts.map +1 -1
- package/dist/shared/ai/schemas.js +38 -8
- package/dist/shared/ai/schemas.js.map +1 -1
- package/dist/shared/ai/types.d.ts +93 -81
- package/dist/shared/ai/types.d.ts.map +1 -1
- package/dist/shared/ajv.js +33 -32
- package/dist/shared/ajv.js.map +1 -1
- package/dist/shared/attributes.d.ts +86 -86
- package/dist/shared/attributes.d.ts.map +1 -1
- package/dist/shared/attributes.js +22 -25
- package/dist/shared/brick-manifest.d.ts +8 -5
- package/dist/shared/brick-manifest.d.ts.map +1 -1
- package/dist/shared/brick-manifest.js +3 -18
- package/dist/shared/bricks/manifests/_types.d.ts +9 -0
- package/dist/shared/bricks/manifests/_types.d.ts.map +1 -0
- package/dist/shared/bricks/manifests/_types.js +3 -0
- package/dist/shared/bricks/manifests/accordion.manifest.d.ts +4 -8
- package/dist/shared/bricks/manifests/accordion.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/accordion.manifest.js +13 -20
- package/dist/shared/bricks/manifests/all-manifests.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/all-manifests.js +44 -43
- package/dist/shared/bricks/manifests/all-props.d.ts +1501 -0
- package/dist/shared/bricks/manifests/all-props.d.ts.map +1 -0
- package/dist/shared/bricks/manifests/all-props.js +243 -0
- package/dist/shared/bricks/manifests/all-props.js.map +1 -0
- package/dist/shared/bricks/manifests/box.manifest.d.ts +4 -8
- package/dist/shared/bricks/manifests/box.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/box.manifest.js +16 -20
- package/dist/shared/bricks/manifests/button.manifest.d.ts +5 -12
- package/dist/shared/bricks/manifests/button.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/button.manifest.js +13 -20
- package/dist/shared/bricks/manifests/card.manifest.d.ts +10 -9
- package/dist/shared/bricks/manifests/card.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/card.manifest.js +18 -20
- package/dist/shared/bricks/manifests/carousel.manifest.d.ts +4 -8
- package/dist/shared/bricks/manifests/carousel.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/carousel.manifest.js +15 -20
- package/dist/shared/bricks/manifests/footer.manifest.d.ts +5 -9
- package/dist/shared/bricks/manifests/footer.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/footer.manifest.js +13 -20
- package/dist/shared/bricks/manifests/form.manifest.d.ts +5 -9
- package/dist/shared/bricks/manifests/form.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/form.manifest.js +13 -20
- package/dist/shared/bricks/manifests/hero.manifest.d.ts +4 -8
- package/dist/shared/bricks/manifests/hero.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/hero.manifest.js +13 -20
- package/dist/shared/bricks/manifests/html.manifest.d.ts +3 -7
- package/dist/shared/bricks/manifests/html.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/html.manifest.js +8 -20
- package/dist/shared/bricks/manifests/icon.manifest.d.ts +3 -7
- package/dist/shared/bricks/manifests/icon.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/icon.manifest.js +13 -20
- package/dist/shared/bricks/manifests/image.manifest.d.ts +3 -2
- package/dist/shared/bricks/manifests/image.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/image.manifest.js +16 -20
- package/dist/shared/bricks/manifests/images-gallery.manifest.d.ts +4 -8
- package/dist/shared/bricks/manifests/images-gallery.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/images-gallery.manifest.js +15 -20
- package/dist/shared/bricks/manifests/map.manifest.d.ts +3 -7
- package/dist/shared/bricks/manifests/map.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/map.manifest.js +11 -20
- package/dist/shared/bricks/manifests/navbar.manifest.d.ts +7 -11
- package/dist/shared/bricks/manifests/navbar.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/navbar.manifest.js +15 -20
- package/dist/shared/bricks/manifests/sidebar.manifest.d.ts +3 -7
- package/dist/shared/bricks/manifests/sidebar.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/sidebar.manifest.js +13 -20
- package/dist/shared/bricks/manifests/social-links.manifest.d.ts +4 -8
- package/dist/shared/bricks/manifests/social-links.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/social-links.manifest.js +14 -20
- package/dist/shared/bricks/manifests/spacer.manifest.d.ts +3 -7
- package/dist/shared/bricks/manifests/spacer.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/spacer.manifest.js +8 -20
- package/dist/shared/bricks/manifests/table.manifest.d.ts +6 -10
- package/dist/shared/bricks/manifests/table.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/table.manifest.js +15 -20
- package/dist/shared/bricks/manifests/tabs.manifest.d.ts +6 -10
- package/dist/shared/bricks/manifests/tabs.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/tabs.manifest.js +15 -20
- package/dist/shared/bricks/manifests/testimonials.manifest.d.ts +4 -8
- package/dist/shared/bricks/manifests/testimonials.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/testimonials.manifest.js +18 -20
- package/dist/shared/bricks/manifests/text.manifest.d.ts +4 -12
- package/dist/shared/bricks/manifests/text.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/text.manifest.js +13 -20
- package/dist/shared/bricks/manifests/timeline.manifest.d.ts +9 -13
- package/dist/shared/bricks/manifests/timeline.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/timeline.manifest.js +15 -20
- package/dist/shared/bricks/manifests/video.manifest.d.ts +3 -7
- package/dist/shared/bricks/manifests/video.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/video.manifest.js +11 -20
- package/dist/shared/bricks/props/align.d.ts +0 -3
- package/dist/shared/bricks/props/align.d.ts.map +1 -1
- package/dist/shared/bricks/props/align.js +4 -11
- package/dist/shared/bricks/props/background.d.ts +2 -8
- package/dist/shared/bricks/props/background.d.ts.map +1 -1
- package/dist/shared/bricks/props/background.js +4 -9
- package/dist/shared/bricks/props/border.d.ts +0 -7
- package/dist/shared/bricks/props/border.d.ts.map +1 -1
- package/dist/shared/bricks/props/border.js +5 -10
- package/dist/shared/bricks/props/color-preset.d.ts +316 -6
- package/dist/shared/bricks/props/color-preset.d.ts.map +1 -1
- package/dist/shared/bricks/props/color-preset.js +2 -5
- package/dist/shared/bricks/props/color.d.ts +3 -5
- package/dist/shared/bricks/props/color.d.ts.map +1 -1
- package/dist/shared/bricks/props/color.js +3 -8
- package/dist/shared/bricks/props/common.d.ts.map +1 -1
- package/dist/shared/bricks/props/common.js +4 -5
- package/dist/shared/bricks/props/css-length.d.ts +0 -1
- package/dist/shared/bricks/props/css-length.d.ts.map +1 -1
- package/dist/shared/bricks/props/css-length.js +1 -4
- package/dist/shared/bricks/props/datasource.d.ts +3 -3
- package/dist/shared/bricks/props/datasource.d.ts.map +1 -1
- package/dist/shared/bricks/props/datasource.js +74 -76
- package/dist/shared/bricks/props/datasource.js.map +1 -1
- package/dist/shared/bricks/props/date.js +21 -4
- package/dist/shared/bricks/props/date.js.map +1 -1
- package/dist/shared/bricks/props/direction.d.ts +1 -2
- package/dist/shared/bricks/props/direction.d.ts.map +1 -1
- package/dist/shared/bricks/props/direction.js +4 -7
- package/dist/shared/bricks/props/dynamic.d.ts +5 -67
- package/dist/shared/bricks/props/dynamic.d.ts.map +1 -1
- package/dist/shared/bricks/props/dynamic.js +6 -24
- package/dist/shared/bricks/props/effects.d.ts +1 -3
- package/dist/shared/bricks/props/effects.d.ts.map +1 -1
- package/dist/shared/bricks/props/effects.js +4 -9
- package/dist/shared/bricks/props/geolocation.d.ts.map +1 -1
- package/dist/shared/bricks/props/geolocation.js +3 -6
- package/dist/shared/bricks/props/geolocation.js.map +1 -1
- package/dist/shared/bricks/props/helpers.js +5 -6
- package/dist/shared/bricks/props/image.d.ts +2 -8
- package/dist/shared/bricks/props/image.d.ts.map +1 -1
- package/dist/shared/bricks/props/image.js +4 -7
- package/dist/shared/bricks/props/string.d.ts +2 -5
- package/dist/shared/bricks/props/string.d.ts.map +1 -1
- package/dist/shared/bricks/props/string.js +3 -10
- package/dist/shared/bricks/props/tags.d.ts +0 -1
- package/dist/shared/bricks/props/tags.d.ts.map +1 -1
- package/dist/shared/bricks/props/tags.js +3 -6
- package/dist/shared/bricks/props/text.d.ts +0 -3
- package/dist/shared/bricks/props/text.d.ts.map +1 -1
- package/dist/shared/bricks/props/text.js +4 -11
- package/dist/shared/bricks/props/types.d.ts +2 -2
- package/dist/shared/bricks/props/types.d.ts.map +1 -1
- package/dist/shared/bricks.d.ts +64 -152
- package/dist/shared/bricks.d.ts.map +1 -1
- package/dist/shared/bricks.js +49 -52
- package/dist/shared/chunk-2O5HVPID.js +41 -0
- package/dist/shared/chunk-2O5HVPID.js.map +1 -0
- package/dist/shared/{chunk-F22LDHEO.js → chunk-2U5U3CCJ.js} +3 -18
- package/dist/shared/chunk-2U5U3CCJ.js.map +1 -0
- package/dist/shared/{chunk-LXAO3JA6.js → chunk-4KY7OZWD.js} +35 -35
- package/dist/shared/chunk-4KY7OZWD.js.map +1 -0
- package/dist/shared/{chunk-TNMNMYOB.js → chunk-5RCC2STG.js} +2 -13
- package/dist/shared/chunk-5RCC2STG.js.map +1 -0
- package/dist/shared/{chunk-V3UA3LRK.js → chunk-6AE7UD73.js} +56 -37
- package/dist/shared/chunk-6AE7UD73.js.map +1 -0
- package/dist/shared/chunk-7U5WPHXB.js +346 -0
- package/dist/shared/chunk-7U5WPHXB.js.map +1 -0
- package/dist/shared/{chunk-Q4NPPLEU.js → chunk-BHARJBEK.js} +2 -9
- package/dist/shared/chunk-BHARJBEK.js.map +1 -0
- package/dist/shared/chunk-BZTWZC77.js +530 -0
- package/dist/shared/chunk-BZTWZC77.js.map +1 -0
- package/dist/shared/{chunk-QSND5IWT.js → chunk-DCM4732T.js} +24 -43
- package/dist/shared/chunk-DCM4732T.js.map +1 -0
- package/dist/shared/{chunk-W6MRYRGJ.js → chunk-DRQKKPTX.js} +6 -20
- package/dist/shared/chunk-DRQKKPTX.js.map +1 -0
- package/dist/shared/{chunk-CSF2WQX2.js → chunk-EID5HPF3.js} +15 -12
- package/dist/shared/chunk-EID5HPF3.js.map +1 -0
- package/dist/shared/chunk-EMF5TCPX.js +389 -0
- package/dist/shared/chunk-EMF5TCPX.js.map +1 -0
- package/dist/shared/chunk-FD7YYFRI.js +225 -0
- package/dist/shared/chunk-FD7YYFRI.js.map +1 -0
- package/dist/shared/{chunk-MLZT7MRQ.js → chunk-FHA4DFIM.js} +26 -27
- package/dist/shared/chunk-FHA4DFIM.js.map +1 -0
- package/dist/shared/{chunk-GRMY35BU.js → chunk-FUUSAMN3.js} +165 -40
- package/dist/shared/chunk-FUUSAMN3.js.map +1 -0
- package/dist/shared/chunk-GDYCCB3B.js +22 -0
- package/dist/shared/chunk-GDYCCB3B.js.map +1 -0
- package/dist/shared/chunk-GLV6QIIM.js +41 -0
- package/dist/shared/chunk-GLV6QIIM.js.map +1 -0
- package/dist/shared/chunk-H6TMBELF.js +374 -0
- package/dist/shared/chunk-H6TMBELF.js.map +1 -0
- package/dist/shared/{chunk-BMWRR4DI.js → chunk-HUWMIXNN.js} +26 -28
- package/dist/shared/chunk-HUWMIXNN.js.map +1 -0
- package/dist/shared/chunk-HY7JOP3J.js +150 -0
- package/dist/shared/chunk-HY7JOP3J.js.map +1 -0
- package/dist/shared/{chunk-TFGGYU6Y.js → chunk-IEMCCHM4.js} +7 -12
- package/dist/shared/chunk-IEMCCHM4.js.map +1 -0
- package/dist/shared/{chunk-TB3X4LRQ.js → chunk-J45LSQT6.js} +2 -2
- package/dist/shared/chunk-J45LSQT6.js.map +1 -0
- package/dist/shared/{chunk-WGDUJSSS.js → chunk-JF52BBFD.js} +27 -28
- package/dist/shared/chunk-JF52BBFD.js.map +1 -0
- package/dist/shared/{chunk-GPCI2N2A.js → chunk-JLDAS3VE.js} +136 -33
- package/dist/shared/chunk-JLDAS3VE.js.map +1 -0
- package/dist/shared/{chunk-SE6O65HC.js → chunk-JSDKK5QN.js} +10 -23
- package/dist/shared/chunk-JSDKK5QN.js.map +1 -0
- package/dist/shared/chunk-JW7MQAU4.js +354 -0
- package/dist/shared/chunk-JW7MQAU4.js.map +1 -0
- package/dist/shared/{chunk-RV7AYVFV.js → chunk-KKWT3OXF.js} +4 -19
- package/dist/shared/chunk-KKWT3OXF.js.map +1 -0
- package/dist/shared/{chunk-TEO6TJOM.js → chunk-KQH6V22E.js} +36 -35
- package/dist/shared/{chunk-TEO6TJOM.js.map → chunk-KQH6V22E.js.map} +1 -1
- package/dist/shared/{chunk-3KLRW4I2.js → chunk-LGDDJJHK.js} +212 -156
- package/dist/shared/chunk-LGDDJJHK.js.map +1 -0
- package/dist/shared/{chunk-QL3T5HJQ.js → chunk-LGGPCCCY.js} +3 -3
- package/dist/shared/chunk-LGGPCCCY.js.map +1 -0
- package/dist/shared/{chunk-2HO4FHLM.js → chunk-LPAQ47C6.js} +137 -171
- package/dist/shared/chunk-LPAQ47C6.js.map +1 -0
- package/dist/shared/chunk-MO6CRLQA.js +73 -0
- package/dist/shared/chunk-MO6CRLQA.js.map +1 -0
- package/dist/shared/{chunk-SHUGHJ7V.js → chunk-MYOLWTB2.js} +29 -32
- package/dist/shared/chunk-MYOLWTB2.js.map +1 -0
- package/dist/shared/{chunk-Z2NTDFB4.js → chunk-O24RDXZS.js} +34 -34
- package/dist/shared/chunk-O24RDXZS.js.map +1 -0
- package/dist/shared/{chunk-BPBKHEQ5.js → chunk-OJ6KL7FU.js} +1 -8
- package/dist/shared/chunk-OJ6KL7FU.js.map +1 -0
- package/dist/shared/{chunk-GCQURRVB.js → chunk-PF75LW33.js} +24 -27
- package/dist/shared/chunk-PF75LW33.js.map +1 -0
- package/dist/shared/{chunk-EWSPTRDL.js → chunk-QEJGPYTB.js} +132 -48
- package/dist/shared/chunk-QEJGPYTB.js.map +1 -0
- package/dist/shared/{chunk-P3RH5URN.js → chunk-SK2O7GFC.js} +17 -18
- package/dist/shared/chunk-SK2O7GFC.js.map +1 -0
- package/dist/shared/{chunk-UQF52PWK.js → chunk-SQXZNGQF.js} +8 -23
- package/dist/shared/chunk-SQXZNGQF.js.map +1 -0
- package/dist/shared/{chunk-NTLAKMMQ.js → chunk-SRYBJ6NQ.js} +6 -17
- package/dist/shared/chunk-SRYBJ6NQ.js.map +1 -0
- package/dist/shared/{chunk-O5PLB3YB.js → chunk-T6C3NG2L.js} +68 -59
- package/dist/shared/chunk-T6C3NG2L.js.map +1 -0
- package/dist/shared/{chunk-U7TVEPKA.js → chunk-TBT2PTGB.js} +41 -33
- package/dist/shared/chunk-TBT2PTGB.js.map +1 -0
- package/dist/shared/{chunk-CKFRSHR2.js → chunk-U4KZUX37.js} +18 -19
- package/dist/shared/chunk-U4KZUX37.js.map +1 -0
- package/dist/shared/{chunk-4WI23M7W.js → chunk-VSLRTXLF.js} +11 -4
- package/dist/shared/chunk-VSLRTXLF.js.map +1 -0
- package/dist/shared/{chunk-BHC2A43S.js → chunk-VTCHJT4O.js} +3 -3
- package/dist/shared/{chunk-BHC2A43S.js.map → chunk-VTCHJT4O.js.map} +1 -1
- package/dist/shared/{chunk-DRTGM2UJ.js → chunk-W2RFDII5.js} +3 -3
- package/dist/shared/chunk-W2RFDII5.js.map +1 -0
- package/dist/shared/{chunk-Y74LZNND.js → chunk-WPZV3LYL.js} +4 -10
- package/dist/shared/chunk-WPZV3LYL.js.map +1 -0
- package/dist/shared/chunk-XFZQGRRL.js +101 -0
- package/dist/shared/chunk-XFZQGRRL.js.map +1 -0
- package/dist/shared/{chunk-QQQ3FYPG.js → chunk-XK2CERPB.js} +147 -31
- package/dist/shared/chunk-XK2CERPB.js.map +1 -0
- package/dist/shared/chunk-XNRSL6FL.js +78 -0
- package/dist/shared/chunk-XNRSL6FL.js.map +1 -0
- package/dist/shared/{chunk-2RK3CPYJ.js → chunk-XXPSM6UA.js} +9 -12
- package/dist/shared/chunk-XXPSM6UA.js.map +1 -0
- package/dist/shared/{chunk-ZLYIRH2B.js → chunk-ZRBTAC3G.js} +3 -18
- package/dist/shared/chunk-ZRBTAC3G.js.map +1 -0
- package/dist/shared/{chunk-Z35I5JM5.js → chunk-ZVJNRKT4.js} +18 -20
- package/dist/shared/chunk-ZVJNRKT4.js.map +1 -0
- package/dist/shared/context.d.ts +402 -22
- package/dist/shared/context.d.ts.map +1 -1
- package/dist/shared/context.js +93 -0
- package/dist/shared/context.js.map +1 -1
- package/dist/shared/datarecords/external/airtable/types.d.ts +1 -1
- package/dist/shared/datarecords/external/airtable/types.d.ts.map +1 -1
- package/dist/shared/datarecords/external/airtable/types.js +2 -1
- package/dist/shared/datarecords/types.d.ts +10 -63
- package/dist/shared/datarecords/types.d.ts.map +1 -1
- package/dist/shared/datarecords/types.js +5 -6
- package/dist/shared/datasources/external/instagram/feed/schema.d.ts +1 -1
- package/dist/shared/datasources/external/instagram/feed/schema.d.ts.map +1 -1
- package/dist/shared/datasources/external/instagram/feed/schema.js +4 -1
- package/dist/shared/datasources/external/instagram/feed/schema.js.map +1 -1
- package/dist/shared/datasources/external/mastodon/status/schema.d.ts +6 -6
- package/dist/shared/datasources/external/mastodon/status/schema.d.ts.map +1 -1
- package/dist/shared/datasources/external/mastodon/status/schema.js +6 -19
- package/dist/shared/datasources/external/mastodon/status/schema.js.map +1 -1
- package/dist/shared/datasources/external/meta/oauth/config.d.ts +2 -2
- package/dist/shared/datasources/external/meta/oauth/config.d.ts.map +1 -1
- package/dist/shared/datasources/external/meta/oauth/config.js +4 -1
- package/dist/shared/datasources/external/meta/oauth/config.js.map +1 -1
- package/dist/shared/datasources/external/threads/media/fetcher.js +3 -3
- package/dist/shared/datasources/external/threads/media/schema.d.ts +1 -1
- package/dist/shared/datasources/external/threads/media/schema.d.ts.map +1 -1
- package/dist/shared/datasources/external/threads/media/schema.js +4 -8
- package/dist/shared/datasources/external/threads/media/schema.js.map +1 -1
- package/dist/shared/datasources/internal/blog/schema.d.ts +1 -1
- package/dist/shared/datasources/internal/blog/schema.d.ts.map +1 -1
- package/dist/shared/datasources/internal/blog/schema.js +4 -1
- package/dist/shared/datasources/internal/blog/schema.js.map +1 -1
- package/dist/shared/datasources/types.d.ts +25 -25
- package/dist/shared/datasources/types.d.ts.map +1 -1
- package/dist/shared/datasources/types.js +3 -16
- package/dist/shared/datasources.d.ts +1 -1
- package/dist/shared/datasources.d.ts.map +1 -1
- package/dist/shared/datasources.js +1 -3
- package/dist/shared/datasources.js.map +1 -1
- package/dist/shared/images.d.ts +1 -1
- package/dist/shared/images.d.ts.map +1 -1
- package/dist/shared/images.js +4 -38
- package/dist/shared/images.js.map +1 -1
- package/dist/shared/page.d.ts +139 -22
- package/dist/shared/page.d.ts.map +1 -1
- package/dist/shared/page.js +51 -49
- package/dist/shared/responsive.js +1 -1
- package/dist/shared/site.d.ts +80 -197
- package/dist/shared/site.d.ts.map +1 -1
- package/dist/shared/site.js +55 -114
- package/dist/shared/site.js.map +1 -1
- package/dist/shared/sitemap.d.ts +6 -327
- package/dist/shared/sitemap.d.ts.map +1 -1
- package/dist/shared/sitemap.js +50 -58
- package/dist/shared/theme.d.ts +0 -37
- package/dist/shared/theme.d.ts.map +1 -1
- package/dist/shared/theme.js +4 -21
- package/dist/shared/utils/llm.d.ts +1 -10
- package/dist/shared/utils/llm.d.ts.map +1 -1
- package/dist/shared/utils/llm.js +1 -18
- package/dist/shared/utils/schema.d.ts +3 -2
- package/dist/shared/utils/schema.d.ts.map +1 -1
- package/dist/shared/utils/schema.js +2 -17
- package/dist/shared/utils/string-enum.d.ts +9 -3
- package/dist/shared/utils/string-enum.d.ts.map +1 -1
- package/dist/shared/utils/string-enum.js +1 -1
- package/package.json +21 -5
- package/src/shared/ai/schemas.ts +41 -10
- package/src/shared/ai/types.ts +78 -76
- package/src/shared/attributes.ts +56 -46
- package/src/shared/brick-manifest.ts +5 -6
- package/src/shared/bricks/manifests/_types.ts +9 -0
- package/src/shared/bricks/manifests/accordion.manifest.ts +138 -171
- package/src/shared/bricks/manifests/all-manifests.ts +1 -0
- package/src/shared/bricks/manifests/all-props.ts +165 -0
- package/src/shared/bricks/manifests/box.manifest.ts +214 -150
- package/src/shared/bricks/manifests/button.manifest.ts +204 -79
- package/src/shared/bricks/manifests/card.manifest.ts +229 -43
- package/src/shared/bricks/manifests/carousel.manifest.ts +165 -35
- package/src/shared/bricks/manifests/footer.manifest.ts +18 -20
- package/src/shared/bricks/manifests/form.manifest.ts +136 -22
- package/src/shared/bricks/manifests/hero.manifest.ts +121 -38
- package/src/shared/bricks/manifests/html.manifest.ts +2 -5
- package/src/shared/bricks/manifests/icon.manifest.ts +225 -46
- package/src/shared/bricks/manifests/image.manifest.ts +125 -21
- package/src/shared/bricks/manifests/images-gallery.manifest.ts +15 -20
- package/src/shared/bricks/manifests/map.manifest.ts +12 -15
- package/src/shared/bricks/manifests/navbar.manifest.ts +22 -26
- package/src/shared/bricks/manifests/sidebar.manifest.ts +11 -14
- package/src/shared/bricks/manifests/social-links.manifest.ts +19 -24
- package/src/shared/bricks/manifests/spacer.manifest.ts +2 -5
- package/src/shared/bricks/manifests/table.manifest.ts +17 -20
- package/src/shared/bricks/manifests/tabs.manifest.ts +16 -21
- package/src/shared/bricks/manifests/testimonials.manifest.ts +23 -25
- package/src/shared/bricks/manifests/text.manifest.ts +47 -29
- package/src/shared/bricks/manifests/timeline.manifest.ts +31 -29
- package/src/shared/bricks/manifests/video.manifest.ts +11 -15
- package/src/shared/bricks/props/align.ts +0 -13
- package/src/shared/bricks/props/background.ts +1 -14
- package/src/shared/bricks/props/border.ts +2 -13
- package/src/shared/bricks/props/color-preset.ts +9 -10
- package/src/shared/bricks/props/color.ts +7 -18
- package/src/shared/bricks/props/common.ts +6 -7
- package/src/shared/bricks/props/css-length.ts +0 -5
- package/src/shared/bricks/props/datasource.ts +72 -74
- package/src/shared/bricks/props/direction.ts +1 -5
- package/src/shared/bricks/props/dynamic.ts +0 -11
- package/src/shared/bricks/props/effects.ts +0 -9
- package/src/shared/bricks/props/geolocation.ts +3 -3
- package/src/shared/bricks/props/helpers.ts +1 -1
- package/src/shared/bricks/props/image.ts +4 -16
- package/src/shared/bricks/props/string.ts +6 -19
- package/src/shared/bricks/props/tags.ts +0 -5
- package/src/shared/bricks/props/tests/background.test.ts +1 -15
- package/src/shared/bricks/props/tests/image.test.ts +3 -9
- package/src/shared/bricks/props/tests/string.test.ts +2 -26
- package/src/shared/bricks/props/text.ts +0 -12
- package/src/shared/bricks/props/types.ts +4 -3
- package/src/shared/bricks.ts +164 -1025
- package/src/shared/context.ts +24 -23
- package/src/shared/datarecords/external/airtable/types.ts +12 -11
- package/src/shared/datarecords/types.ts +22 -44
- package/src/shared/datasources/external/instagram/feed/schema.ts +2 -1
- package/src/shared/datasources/external/mastodon/status/schema.ts +4 -19
- package/src/shared/datasources/external/meta/oauth/config.ts +2 -1
- package/src/shared/datasources/external/threads/media/schema.ts +2 -8
- package/src/shared/datasources/internal/blog/schema.ts +2 -1
- package/src/shared/datasources/types.ts +64 -79
- package/src/shared/datasources.ts +2 -4
- package/src/shared/images.ts +12 -18
- package/src/shared/page.ts +9 -2
- package/src/shared/site.ts +3 -3
- package/src/shared/sitemap.ts +3 -68
- package/src/shared/tests/attributes.test.ts +2 -0
- package/src/shared/theme.ts +81 -96
- package/src/shared/utils/llm.ts +5 -191
- package/src/shared/utils/schema.ts +71 -244
- package/src/shared/utils/string-enum.ts +25 -4
- package/src/shared/utils/tests/schema.test.ts +112 -314
- package/dist/shared/chunk-2HO4FHLM.js.map +0 -1
- package/dist/shared/chunk-2RK3CPYJ.js.map +0 -1
- package/dist/shared/chunk-3KLRW4I2.js.map +0 -1
- package/dist/shared/chunk-4WI23M7W.js.map +0 -1
- package/dist/shared/chunk-6E42XWFH.js +0 -103
- package/dist/shared/chunk-6E42XWFH.js.map +0 -1
- package/dist/shared/chunk-A2QPY54H.js +0 -13
- package/dist/shared/chunk-A2QPY54H.js.map +0 -1
- package/dist/shared/chunk-BMWRR4DI.js.map +0 -1
- package/dist/shared/chunk-BPBKHEQ5.js.map +0 -1
- package/dist/shared/chunk-BW6EFRSF.js +0 -794
- package/dist/shared/chunk-BW6EFRSF.js.map +0 -1
- package/dist/shared/chunk-CKFRSHR2.js.map +0 -1
- package/dist/shared/chunk-CSF2WQX2.js.map +0 -1
- package/dist/shared/chunk-D4YQ6ABM.js +0 -338
- package/dist/shared/chunk-D4YQ6ABM.js.map +0 -1
- package/dist/shared/chunk-DRTGM2UJ.js.map +0 -1
- package/dist/shared/chunk-EQMU6NIU.js +0 -1222
- package/dist/shared/chunk-EQMU6NIU.js.map +0 -1
- package/dist/shared/chunk-EWSPTRDL.js.map +0 -1
- package/dist/shared/chunk-F22LDHEO.js.map +0 -1
- package/dist/shared/chunk-FVU5PXRC.js +0 -244
- package/dist/shared/chunk-FVU5PXRC.js.map +0 -1
- package/dist/shared/chunk-GCQURRVB.js.map +0 -1
- package/dist/shared/chunk-GPCI2N2A.js.map +0 -1
- package/dist/shared/chunk-GRMY35BU.js.map +0 -1
- package/dist/shared/chunk-JK2FWFJU.js +0 -15
- package/dist/shared/chunk-JK2FWFJU.js.map +0 -1
- package/dist/shared/chunk-LXAO3JA6.js.map +0 -1
- package/dist/shared/chunk-MLZT7MRQ.js.map +0 -1
- package/dist/shared/chunk-NT3IW52F.js +0 -260
- package/dist/shared/chunk-NT3IW52F.js.map +0 -1
- package/dist/shared/chunk-NTLAKMMQ.js.map +0 -1
- package/dist/shared/chunk-O5PLB3YB.js.map +0 -1
- package/dist/shared/chunk-P3RH5URN.js.map +0 -1
- package/dist/shared/chunk-Q4NPPLEU.js.map +0 -1
- package/dist/shared/chunk-QL3T5HJQ.js.map +0 -1
- package/dist/shared/chunk-QQQ3FYPG.js.map +0 -1
- package/dist/shared/chunk-QSND5IWT.js.map +0 -1
- package/dist/shared/chunk-RV7AYVFV.js.map +0 -1
- package/dist/shared/chunk-SE6O65HC.js.map +0 -1
- package/dist/shared/chunk-SHUGHJ7V.js.map +0 -1
- package/dist/shared/chunk-TB3X4LRQ.js.map +0 -1
- package/dist/shared/chunk-TFGGYU6Y.js.map +0 -1
- package/dist/shared/chunk-TNMNMYOB.js.map +0 -1
- package/dist/shared/chunk-U7TVEPKA.js.map +0 -1
- package/dist/shared/chunk-UQF52PWK.js.map +0 -1
- package/dist/shared/chunk-V3UA3LRK.js.map +0 -1
- package/dist/shared/chunk-W6MRYRGJ.js.map +0 -1
- package/dist/shared/chunk-WGDUJSSS.js.map +0 -1
- package/dist/shared/chunk-WKN566LN.js +0 -29
- package/dist/shared/chunk-WKN566LN.js.map +0 -1
- package/dist/shared/chunk-X6N463D4.js +0 -222
- package/dist/shared/chunk-X6N463D4.js.map +0 -1
- package/dist/shared/chunk-X75YV73Q.js +0 -178
- package/dist/shared/chunk-X75YV73Q.js.map +0 -1
- package/dist/shared/chunk-Y74LZNND.js.map +0 -1
- package/dist/shared/chunk-Z2NTDFB4.js.map +0 -1
- package/dist/shared/chunk-Z35I5JM5.js.map +0 -1
- package/dist/shared/chunk-ZLYIRH2B.js.map +0 -1
- package/dist/shared/schema-registry.d.ts +0 -5
- package/dist/shared/schema-registry.d.ts.map +0 -1
- package/dist/shared/schema-registry.js +0 -119
- package/dist/shared/schema-registry.js.map +0 -1
- package/dist/shared/tests/schema-registry.test.d.ts +0 -2
- package/dist/shared/tests/schema-registry.test.d.ts.map +0 -1
- package/dist/shared/utils/schema-registry.d.ts +0 -5
- package/dist/shared/utils/schema-registry.d.ts.map +0 -1
- package/dist/shared/utils/schema-registry.js +0 -29
- package/dist/shared/utils/tests/schema-registry.test.d.ts +0 -2
- package/dist/shared/utils/tests/schema-registry.test.d.ts.map +0 -1
- package/dist/shared/utils/typed-ref.d.ts +0 -43
- package/dist/shared/utils/typed-ref.d.ts.map +0 -1
- package/dist/shared/utils/typed-ref.js +0 -10
- package/dist/shared/utils/typed-ref.js.map +0 -1
- package/src/shared/schema-registry.ts +0 -82
- package/src/shared/tests/schema-registry.test.ts +0 -14
- package/src/shared/utils/schema-registry.ts +0 -82
- package/src/shared/utils/tests/schema-registry.test.ts +0 -13
- package/src/shared/utils/typed-ref.ts +0 -53
- /package/dist/shared/{utils/schema-registry.js.map → bricks/manifests/_types.js.map} +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Static, StringOptions } from "@sinclair/typebox";
|
|
2
2
|
import { StringEnum } from "~/shared/utils/string-enum";
|
|
3
|
-
import { typedRef } from "~/shared/utils/typed-ref";
|
|
4
3
|
|
|
5
4
|
export function justifyContent(options: StringOptions = {}) {
|
|
6
5
|
return StringEnum(
|
|
@@ -20,10 +19,6 @@ export function justifyContent(options: StringOptions = {}) {
|
|
|
20
19
|
|
|
21
20
|
export type JustifyContentSettings = Static<ReturnType<typeof justifyContent>>;
|
|
22
21
|
|
|
23
|
-
export function justifyContentRef(options: StringOptions = {}) {
|
|
24
|
-
return typedRef("styles:justifyContent", options);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
22
|
export function alignItems(options: StringOptions = {}) {
|
|
28
23
|
return StringEnum(["items-start", "items-center", "items-end", "items-stretch"], {
|
|
29
24
|
enumNames: ["Start", "Center", "End", "Stretch"],
|
|
@@ -39,10 +34,6 @@ export function alignItems(options: StringOptions = {}) {
|
|
|
39
34
|
|
|
40
35
|
export type AlignItemsSettings = Static<ReturnType<typeof alignItems>>;
|
|
41
36
|
|
|
42
|
-
export function alignItemsRef(options: StringOptions = {}) {
|
|
43
|
-
return typedRef("styles:alignItems", options);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
37
|
export function alignSelf(options: StringOptions = {}) {
|
|
47
38
|
return StringEnum(["self-auto", "self-start", "self-center", "self-end", "self-stretch"], {
|
|
48
39
|
enumNames: ["Auto", "Start", "Center", "End", "Stretch"],
|
|
@@ -57,7 +48,3 @@ export function alignSelf(options: StringOptions = {}) {
|
|
|
57
48
|
}
|
|
58
49
|
|
|
59
50
|
export type AlignSelfSettings = Static<ReturnType<typeof alignSelf>>;
|
|
60
|
-
|
|
61
|
-
export function alignSelfRef(options: StringOptions = {}) {
|
|
62
|
-
return typedRef("styles:alignSelf", options);
|
|
63
|
-
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type SchemaOptions, Type, type Static } from "@sinclair/typebox";
|
|
2
2
|
import type { ElementColorType } from "~/shared/themes/color-system";
|
|
3
3
|
import { StringEnum } from "~/shared/utils/string-enum";
|
|
4
|
-
import { typedRef } from "~/shared/utils/typed-ref";
|
|
5
4
|
|
|
6
5
|
type BackgroundOptions = {
|
|
7
6
|
title?: string;
|
|
@@ -14,7 +13,6 @@ type BackgroundOptions = {
|
|
|
14
13
|
};
|
|
15
14
|
|
|
16
15
|
export function background(opts: BackgroundOptions = {}) {
|
|
17
|
-
const { default: defValue, ...restOpts } = opts;
|
|
18
16
|
return Type.Object(
|
|
19
17
|
{
|
|
20
18
|
image: Type.String({
|
|
@@ -26,14 +24,12 @@ export function background(opts: BackgroundOptions = {}) {
|
|
|
26
24
|
size: Type.Optional(
|
|
27
25
|
StringEnum(["auto", "cover", "contain"], {
|
|
28
26
|
enumNames: ["Auto", "Cover", "Contain"],
|
|
29
|
-
default: defValue?.size ?? "auto",
|
|
30
27
|
"ai:instructions": "Only use this when the image is set.",
|
|
31
28
|
}),
|
|
32
29
|
),
|
|
33
30
|
repeat: Type.Optional(
|
|
34
31
|
StringEnum(["no-repeat", "repeat", "repeat-x", "repeat-y", "space", "round"], {
|
|
35
32
|
enumNames: ["No repeat", "Repeat", "Repeat horizontally", "Repeat vertically", "Space", "Round"],
|
|
36
|
-
default: defValue?.repeat ?? "no-repeat",
|
|
37
33
|
"ai:instructions": "Only use this when the image is set.",
|
|
38
34
|
}),
|
|
39
35
|
),
|
|
@@ -45,18 +41,13 @@ export function background(opts: BackgroundOptions = {}) {
|
|
|
45
41
|
title: "Background image",
|
|
46
42
|
// disable for now
|
|
47
43
|
// "ui:show-img-search": true,
|
|
48
|
-
|
|
49
|
-
...restOpts,
|
|
44
|
+
...opts,
|
|
50
45
|
},
|
|
51
46
|
);
|
|
52
47
|
}
|
|
53
48
|
|
|
54
49
|
export type BackgroundSettings = Static<ReturnType<typeof background>>;
|
|
55
50
|
|
|
56
|
-
export function backgroundRef(options: SchemaOptions = {}) {
|
|
57
|
-
return typedRef("styles:background", options);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
51
|
export function backgroundColor(options: SchemaOptions = {}) {
|
|
61
52
|
return Type.String({
|
|
62
53
|
title: "Background color",
|
|
@@ -73,7 +64,3 @@ export function backgroundColor(options: SchemaOptions = {}) {
|
|
|
73
64
|
}
|
|
74
65
|
|
|
75
66
|
export type BackgroundColorSettings = Static<ReturnType<typeof backgroundColor>>;
|
|
76
|
-
|
|
77
|
-
export function backgroundColorRef(options: SchemaOptions = {}) {
|
|
78
|
-
return typedRef("styles:backgroundColor", options);
|
|
79
|
-
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type ObjectOptions, Type, type Static, type StringOptions } from "@sinclair/typebox";
|
|
2
|
-
import { typedRef } from "~/shared/utils/typed-ref";
|
|
3
2
|
import { StringEnum } from "~/shared/utils/string-enum";
|
|
4
|
-
import {
|
|
3
|
+
import { borderColor } from "./color";
|
|
5
4
|
|
|
6
5
|
export function border(opts: ObjectOptions = {}) {
|
|
7
6
|
return Type.Object(
|
|
@@ -15,7 +14,7 @@ export function border(opts: ObjectOptions = {}) {
|
|
|
15
14
|
"ui:placeholder": "None",
|
|
16
15
|
default: "border-0",
|
|
17
16
|
}),
|
|
18
|
-
color:
|
|
17
|
+
color: borderColor({
|
|
19
18
|
title: "Color",
|
|
20
19
|
description: "The color of the border.",
|
|
21
20
|
default: "border-current",
|
|
@@ -48,12 +47,6 @@ export function border(opts: ObjectOptions = {}) {
|
|
|
48
47
|
|
|
49
48
|
export type BorderSettings = Static<ReturnType<typeof border>>;
|
|
50
49
|
|
|
51
|
-
export function borderRef(
|
|
52
|
-
options: Omit<ObjectOptions, "default"> & { default?: Partial<BorderSettings> } = {},
|
|
53
|
-
) {
|
|
54
|
-
return typedRef("styles:border", options);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
50
|
export function rounding(opts: StringOptions = {}) {
|
|
58
51
|
return Type.Optional(
|
|
59
52
|
StringEnum(
|
|
@@ -80,7 +73,3 @@ export function rounding(opts: StringOptions = {}) {
|
|
|
80
73
|
}
|
|
81
74
|
|
|
82
75
|
export type RoundingSettings = Static<ReturnType<typeof rounding>>;
|
|
83
|
-
|
|
84
|
-
export function roundingRef(options: StringOptions = {}) {
|
|
85
|
-
return typedRef("styles:rounding", options);
|
|
86
|
-
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { type Static, type ObjectOptions, Type, type StringOptions, TObject } from "@sinclair/typebox";
|
|
2
2
|
import { StringEnum } from "~/shared/utils/string-enum";
|
|
3
|
-
import { typedRef } from "~/shared/utils/typed-ref";
|
|
4
3
|
|
|
5
4
|
type ColorPresetOptions = ObjectOptions & {
|
|
6
5
|
"ui:presets"?: Record<string, { className: string; label: string }>;
|
|
7
6
|
"ui:default-gradient-direction"?: string;
|
|
8
7
|
};
|
|
9
8
|
|
|
10
|
-
export const colorPresets
|
|
9
|
+
export const colorPresets = {
|
|
11
10
|
"primary-50": {
|
|
12
11
|
className: "bg-primary-50 text-primary-50-content",
|
|
13
12
|
label: "Primary 50",
|
|
@@ -320,21 +319,25 @@ export const colorPresets: NonNullable<ColorPresetOptions["ui:presets"]> = {
|
|
|
320
319
|
className: "",
|
|
321
320
|
label: "None",
|
|
322
321
|
},
|
|
323
|
-
};
|
|
322
|
+
} as const;
|
|
323
|
+
|
|
324
|
+
export type ColorPreset = keyof typeof colorPresets;
|
|
324
325
|
|
|
325
326
|
export function colorPreset(options: ColorPresetOptions = {}) {
|
|
326
327
|
return Type.Object(
|
|
327
328
|
{
|
|
328
|
-
color: StringEnum(Object.keys(colorPresets)
|
|
329
|
+
color: StringEnum(Object.keys(colorPresets) as Array<ColorPreset>, {
|
|
329
330
|
title: "Color preset",
|
|
330
331
|
description: "Color preset to apply to background and text",
|
|
331
|
-
enumNames: Object.keys(colorPresets).map(
|
|
332
|
+
enumNames: Object.keys(colorPresets).map(
|
|
333
|
+
(key) => colorPresets[key as keyof typeof colorPresets].label,
|
|
334
|
+
),
|
|
332
335
|
"ai:instructions": `Presets are predefined color combinations of background and text colors that can be applied to elements.
|
|
333
336
|
The possible semantic colors are primary, secondary, accent, neutral, and base, each declined in various shades from 50 to 900. (except base which has only 100, 200, and 300).
|
|
334
337
|
You can use gradients using color gradient variations (e.g. primary-gradient-100, secondary-gradient-200, etc.). In this case, you will also need to set the gradient direction.`,
|
|
335
338
|
"ui:styleId": "presets:color",
|
|
336
339
|
"ui:responsive": true,
|
|
337
|
-
default: options.default?.color,
|
|
340
|
+
default: options.default?.color ?? "none",
|
|
338
341
|
}),
|
|
339
342
|
gradientDirection: Type.Optional(gradientDirection(options)),
|
|
340
343
|
},
|
|
@@ -356,10 +359,6 @@ You can use gradients using color gradient variations (e.g. primary-gradient-100
|
|
|
356
359
|
|
|
357
360
|
export type ColorPresetSettings = Static<ReturnType<typeof colorPreset>>;
|
|
358
361
|
|
|
359
|
-
export function colorPresetRef(options: ColorPresetOptions = {}) {
|
|
360
|
-
return typedRef("presets:color", options);
|
|
361
|
-
}
|
|
362
|
-
|
|
363
362
|
function gradientDirection(options: StringOptions = {}) {
|
|
364
363
|
return StringEnum(
|
|
365
364
|
[
|
|
@@ -1,40 +1,29 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { typedRef } from "~/shared/utils/typed-ref";
|
|
1
|
+
import { type Static, type StringOptions, Type } from "@sinclair/typebox";
|
|
3
2
|
|
|
4
|
-
export function color(
|
|
3
|
+
export function color(options: StringOptions = {}) {
|
|
5
4
|
return Type.String({
|
|
6
|
-
title,
|
|
7
|
-
// $id: "styles:color",
|
|
5
|
+
title: "Text color",
|
|
8
6
|
"ai:instructions":
|
|
9
7
|
"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
8
|
"ui:styleId": "styles:color",
|
|
12
9
|
"ui:field": "color",
|
|
13
10
|
"ui:color-type": "text",
|
|
11
|
+
...options,
|
|
14
12
|
});
|
|
15
13
|
}
|
|
16
14
|
|
|
17
15
|
export type ColorSettings = Static<ReturnType<typeof color>>;
|
|
18
16
|
|
|
19
|
-
export function
|
|
20
|
-
return typedRef("styles:color", { ...options, "ui:styleId": "styles:color" });
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export function borderColor(defaultValue?: string, title = "Border color") {
|
|
17
|
+
export function borderColor(options: StringOptions = {}) {
|
|
24
18
|
return Type.String({
|
|
25
|
-
title,
|
|
26
|
-
// $id: "styles:borderColor",
|
|
19
|
+
title: "Border color",
|
|
27
20
|
"ai:instructions":
|
|
28
21
|
"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
22
|
"ui:styleId": "styles:borderColor",
|
|
31
23
|
"ui:field": "color",
|
|
32
24
|
"ui:color-type": "border",
|
|
25
|
+
...options,
|
|
33
26
|
});
|
|
34
27
|
}
|
|
35
28
|
|
|
36
29
|
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
|
-
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type Static, type TString, Type } from "@sinclair/typebox";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { alignSelfRef } from "./align";
|
|
2
|
+
import { cssLength } from "./css-length";
|
|
3
|
+
import { alignSelf } from "./align";
|
|
5
4
|
|
|
6
5
|
export function hidden() {
|
|
7
6
|
return Type.Object(
|
|
@@ -25,7 +24,7 @@ export const commonProps = {
|
|
|
25
24
|
"ai:hidden": true,
|
|
26
25
|
}),
|
|
27
26
|
),
|
|
28
|
-
hidden: Type.Optional(
|
|
27
|
+
hidden: Type.Optional(hidden()),
|
|
29
28
|
editable: Type.Optional(
|
|
30
29
|
Type.Boolean({
|
|
31
30
|
"ui:field": "hidden",
|
|
@@ -33,7 +32,7 @@ export const commonProps = {
|
|
|
33
32
|
}),
|
|
34
33
|
),
|
|
35
34
|
width: Type.Optional(
|
|
36
|
-
|
|
35
|
+
cssLength({
|
|
37
36
|
title: "Fixed Width",
|
|
38
37
|
description:
|
|
39
38
|
"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.",
|
|
@@ -42,7 +41,7 @@ export const commonProps = {
|
|
|
42
41
|
}) as TString,
|
|
43
42
|
),
|
|
44
43
|
height: Type.Optional(
|
|
45
|
-
|
|
44
|
+
cssLength({
|
|
46
45
|
title: "Fixed height",
|
|
47
46
|
description:
|
|
48
47
|
"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.",
|
|
@@ -57,7 +56,7 @@ export const commonProps = {
|
|
|
57
56
|
"ui:responsive": true,
|
|
58
57
|
}),
|
|
59
58
|
),
|
|
60
|
-
alignSelf: Type.Optional(
|
|
59
|
+
alignSelf: Type.Optional(alignSelf()),
|
|
61
60
|
};
|
|
62
61
|
|
|
63
62
|
const commonPropsSchema = Type.Object(commonProps);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type Static, Type, type StringOptions } from "@sinclair/typebox";
|
|
2
|
-
import { typedRef } from "~/shared/utils/typed-ref";
|
|
3
2
|
|
|
4
3
|
export const cssUnits = ["px", "%", "em", "rem", "vh", "vw", "dvh", "dvw", "rlh", "lh", "cqh", "cqw"];
|
|
5
4
|
|
|
@@ -18,10 +17,6 @@ export function cssLength(options: StringOptions = {}) {
|
|
|
18
17
|
|
|
19
18
|
export type CssLength = Static<ReturnType<typeof cssLength>>;
|
|
20
19
|
|
|
21
|
-
export function cssLengthRef(options: StringOptions = {}) {
|
|
22
|
-
return typedRef("styles:cssLength", options);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
20
|
export function isCssLength(value: string | number | undefined): boolean {
|
|
26
21
|
if (typeof value !== "string") {
|
|
27
22
|
return false;
|
|
@@ -1,82 +1,80 @@
|
|
|
1
1
|
import { Type, type Static } from "@sinclair/typebox";
|
|
2
2
|
import { StringEnum } from "~/shared/utils/string-enum";
|
|
3
3
|
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
{
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
export const deprecated_datasourceField = Type.Object(
|
|
5
|
+
{
|
|
6
|
+
id: Type.String({
|
|
7
|
+
title: "Database",
|
|
8
|
+
}),
|
|
9
|
+
offset: Type.Optional(
|
|
10
|
+
Type.Number({
|
|
11
|
+
title: "Offset",
|
|
12
|
+
description: "Offset the records to fetch from the datasource",
|
|
13
|
+
minimum: 0,
|
|
14
|
+
default: 0,
|
|
9
15
|
}),
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
16
|
+
),
|
|
17
|
+
limit: Type.Optional(
|
|
18
|
+
Type.Number({
|
|
19
|
+
title: "Limit",
|
|
20
|
+
description:
|
|
21
|
+
"Limit the number of records to fetch from the datasource. Setting to 1 will fetch and render only one item.",
|
|
22
|
+
minimum: 1,
|
|
23
|
+
default: 3,
|
|
24
|
+
}),
|
|
25
|
+
),
|
|
26
|
+
sortDirection: Type.Optional(
|
|
27
|
+
StringEnum(["asc", "desc"], {
|
|
28
|
+
title: "Sort",
|
|
29
|
+
enumNames: ["Ascending", "Descending"],
|
|
30
|
+
description: "Direction to sort the records by",
|
|
31
|
+
default: "desc",
|
|
32
|
+
}),
|
|
33
|
+
),
|
|
34
|
+
sortField: Type.Optional(
|
|
35
|
+
Type.String({
|
|
36
|
+
title: "Sort Field",
|
|
37
|
+
description: "Select a field to sort by (must be indexed)",
|
|
38
|
+
default: "$publicationDate",
|
|
39
|
+
}),
|
|
40
|
+
),
|
|
41
|
+
filters: Type.Optional(
|
|
42
|
+
Type.Array(
|
|
43
|
+
Type.Object({
|
|
44
|
+
field: Type.String(),
|
|
45
|
+
op: StringEnum([
|
|
46
|
+
"eq",
|
|
47
|
+
"ne",
|
|
48
|
+
"lt",
|
|
49
|
+
"lte",
|
|
50
|
+
"gt",
|
|
51
|
+
"gte",
|
|
52
|
+
"in",
|
|
53
|
+
"nin",
|
|
54
|
+
"contains",
|
|
55
|
+
"notContains",
|
|
56
|
+
"startsWith",
|
|
57
|
+
"notStartsWith",
|
|
58
|
+
"endsWith",
|
|
59
|
+
"notEndsWith",
|
|
60
|
+
"before",
|
|
61
|
+
"after",
|
|
62
|
+
]),
|
|
63
|
+
value: Type.Union([Type.String(), Type.Number(), Type.Boolean()]),
|
|
40
64
|
}),
|
|
65
|
+
{
|
|
66
|
+
default: [],
|
|
67
|
+
},
|
|
41
68
|
),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
},
|
|
69
|
+
),
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"ui:field": "datasource",
|
|
73
|
+
title: "Database",
|
|
74
|
+
metadata: {
|
|
75
|
+
category: "content",
|
|
78
76
|
},
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
},
|
|
78
|
+
);
|
|
81
79
|
|
|
82
|
-
export type
|
|
80
|
+
export type DeprecatedDatasourceSettings = Static<typeof deprecated_datasourceField>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type SchemaOptions, type Static, type StringOptions, Type } from "@sinclair/typebox";
|
|
2
2
|
import { StringEnum } from "~/shared/utils/string-enum";
|
|
3
|
-
import { typedRef } from "~/shared/utils/typed-ref";
|
|
4
3
|
|
|
5
4
|
export function direction(options: StringOptions = {}) {
|
|
6
5
|
return StringEnum(["flex-row", "flex-col"], {
|
|
7
6
|
title: "Direction",
|
|
8
7
|
description: "The direction of the layout",
|
|
9
8
|
enumNames: ["Horizontal", "Vertical"],
|
|
9
|
+
default: "flex-row",
|
|
10
10
|
// $id: "styles:direction",
|
|
11
11
|
"ui:styleId": "styles:direction",
|
|
12
12
|
examples: ["flex-row", "flex-col"],
|
|
@@ -15,7 +15,3 @@ export function direction(options: StringOptions = {}) {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export type DirectionSettings = Static<ReturnType<typeof direction>>;
|
|
18
|
-
|
|
19
|
-
export function directionRef(options: SchemaOptions = {}) {
|
|
20
|
-
return typedRef("styles:direction", options);
|
|
21
|
-
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { typedRef } from "~/shared/utils/typed-ref";
|
|
2
1
|
import { type ObjectOptions, Type, type Static } from "@sinclair/typebox";
|
|
3
2
|
import { queryFilter } from "~/shared/datasources/types";
|
|
4
3
|
|
|
@@ -53,14 +52,8 @@ export function queryUse() {
|
|
|
53
52
|
);
|
|
54
53
|
}
|
|
55
54
|
|
|
56
|
-
export const queryUseSchema = queryUseRef();
|
|
57
|
-
|
|
58
55
|
export type QueryUseSettings = Static<ReturnType<typeof queryUse>>;
|
|
59
56
|
|
|
60
|
-
export function queryUseRef(options: ObjectOptions = {}) {
|
|
61
|
-
return typedRef("content:queryUse", options);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
57
|
export function loop(options: ObjectOptions = {}) {
|
|
65
58
|
return Type.Object(
|
|
66
59
|
{
|
|
@@ -105,7 +98,3 @@ export function loop(options: ObjectOptions = {}) {
|
|
|
105
98
|
}
|
|
106
99
|
|
|
107
100
|
export type LoopSettings = Static<ReturnType<typeof loop>>;
|
|
108
|
-
|
|
109
|
-
export function loopRef(options: ObjectOptions = {}) {
|
|
110
|
-
return typedRef("content:loop", options);
|
|
111
|
-
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type SchemaOptions, Type, type Static } from "@sinclair/typebox";
|
|
2
|
-
import { typedRef } from "~/shared/utils/typed-ref";
|
|
3
2
|
import { StringEnum, type StringEnumOptions } from "~/shared/utils/string-enum";
|
|
4
3
|
|
|
5
4
|
export function shadow(options: StringEnumOptions = {}) {
|
|
@@ -19,10 +18,6 @@ export function shadow(options: StringEnumOptions = {}) {
|
|
|
19
18
|
|
|
20
19
|
export type ShadowSettings = Static<ReturnType<typeof shadow>>;
|
|
21
20
|
|
|
22
|
-
export function shadowRef(options: StringEnumOptions = {}) {
|
|
23
|
-
return typedRef("styles:shadow", options);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
21
|
/**
|
|
27
22
|
* This function is used in ajv and type ref translations, but should not be used directly in bricks
|
|
28
23
|
*/
|
|
@@ -43,10 +38,6 @@ export function textShadow(options: StringEnumOptions = {}) {
|
|
|
43
38
|
);
|
|
44
39
|
}
|
|
45
40
|
|
|
46
|
-
export function textShadowRef(options: SchemaOptions = {}) {
|
|
47
|
-
return typedRef("styles:textShadow", options);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
41
|
export type TextShadowSettings = Static<ReturnType<typeof textShadow>>;
|
|
51
42
|
|
|
52
43
|
type OpacityOptions = {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type ObjectOptions, Type, type Static } from "@sinclair/typebox";
|
|
2
2
|
import { number } from "./number";
|
|
3
|
-
import { string } from "./string";
|
|
4
3
|
|
|
5
4
|
export function geolocation(opts: ObjectOptions & { defaultZoom?: number } = {}) {
|
|
6
5
|
const { title = "Location", defaultZoom } = opts;
|
|
@@ -8,10 +7,11 @@ export function geolocation(opts: ObjectOptions & { defaultZoom?: number } = {})
|
|
|
8
7
|
{
|
|
9
8
|
lat: number("Latitude", { "ui:field": "hidden" }),
|
|
10
9
|
lng: number("Longitude", { "ui:field": "hidden" }),
|
|
11
|
-
address:
|
|
10
|
+
address: Type.String({
|
|
11
|
+
title: "Address",
|
|
12
12
|
"ui:field": "geoaddress",
|
|
13
13
|
}),
|
|
14
|
-
tooltip: Type.Optional(
|
|
14
|
+
tooltip: Type.Optional(Type.String({ title: "Tooltip" })),
|
|
15
15
|
zoom: Type.Optional(
|
|
16
16
|
number("Zoom", {
|
|
17
17
|
description: "Zoom level for the map",
|
|
@@ -66,7 +66,7 @@ export function defineProps<P extends TProperties>(
|
|
|
66
66
|
...(options?.noAlignSelf ? {} : { alignSelf }),
|
|
67
67
|
...(options?.noGrow ? {} : { grow }),
|
|
68
68
|
} as typeof allProps;
|
|
69
|
-
return Type.Object(finalProps,
|
|
69
|
+
return Type.Object(finalProps, options);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
// export const optional = Type.Optional;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Type, type Static, type ObjectOptions } from "@sinclair/typebox";
|
|
2
2
|
import { StringEnum } from "~/shared/utils/string-enum";
|
|
3
|
-
import { typedRef } from "~/shared/utils/typed-ref";
|
|
4
3
|
|
|
5
4
|
type PropImageOptions = {
|
|
6
5
|
defaultImageUrl?: string;
|
|
@@ -8,13 +7,12 @@ type PropImageOptions = {
|
|
|
8
7
|
noObjectOptions?: boolean;
|
|
9
8
|
} & ObjectOptions;
|
|
10
9
|
|
|
11
|
-
export function image(
|
|
10
|
+
export function image(options: PropImageOptions = {}) {
|
|
12
11
|
const { defaultImageUrl, showImgSearch = false, noObjectOptions = false } = options;
|
|
13
12
|
const schema = Type.Object(
|
|
14
13
|
{
|
|
15
14
|
src: Type.String({
|
|
16
|
-
|
|
17
|
-
title,
|
|
15
|
+
title: options.title ?? "Image URL",
|
|
18
16
|
description: "Image URL. Can be a link to an image or a data URI",
|
|
19
17
|
}),
|
|
20
18
|
alt: Type.Optional(
|
|
@@ -29,7 +27,6 @@ export function image(title = "Image", options: PropImageOptions = {}) {
|
|
|
29
27
|
enumNames: ["None", "Contain", "Cover", "Fill", "Scale down"],
|
|
30
28
|
title: "Fit",
|
|
31
29
|
description: "How the image should be resized to fit its container",
|
|
32
|
-
default: "object-cover",
|
|
33
30
|
"ui:field": "enum",
|
|
34
31
|
"ui:styleId": "styles:objectFit",
|
|
35
32
|
}),
|
|
@@ -69,16 +66,11 @@ export function image(title = "Image", options: PropImageOptions = {}) {
|
|
|
69
66
|
},
|
|
70
67
|
{
|
|
71
68
|
// $id: "assets:image",
|
|
72
|
-
title,
|
|
69
|
+
title: "Image",
|
|
73
70
|
"ui:field": "image",
|
|
74
71
|
"ui:accept": "image/*",
|
|
75
72
|
"ui:show-img-search": showImgSearch,
|
|
76
73
|
"ui:no-object-options": noObjectOptions,
|
|
77
|
-
default: {
|
|
78
|
-
alt: "Image",
|
|
79
|
-
fit: "object-cover",
|
|
80
|
-
position: "object-center",
|
|
81
|
-
},
|
|
82
74
|
// "ui:responsive": "desktop",
|
|
83
75
|
metadata: {
|
|
84
76
|
category: "content",
|
|
@@ -89,8 +81,4 @@ export function image(title = "Image", options: PropImageOptions = {}) {
|
|
|
89
81
|
return schema;
|
|
90
82
|
}
|
|
91
83
|
|
|
92
|
-
export function imageRef(options: PropImageOptions & SchemaOptions = {}) {
|
|
93
|
-
return typedRef("assets:image", options);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
84
|
export type ImageProps = Static<ReturnType<typeof image>>;
|