@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shared/bricks/manifests/timeline.manifest.ts"],"sourcesContent":["import { Type } from \"@sinclair/typebox\";\nimport { defineBrickManifest } from \"~/shared/brick-manifest\";\nimport { defineProps } from \"../props/helpers\";\nimport { colorPreset } from \"../props/color-preset\";\nimport { cssLength } from \"../props/css-length\";\nimport { border, rounding } from \"../props/border\";\nimport { shadow } from \"../props/effects\";\nimport { BsListCheck } from \"react-icons/bs\";\nimport { loop } from \"../props/dynamic\";\nimport type { BrickProps } from \"../props/types\";\nimport type { BrickExample } from \"./_types\";\nimport { StringEnum } from \"~/shared/utils/string-enum\";\n\nconst timelineItemSchema = Type.Object({\n id: Type.Optional(Type.String({ title: \"ID\" })),\n title: Type.String({\n title: \"Title\",\n description: \"The main title or headline for this timeline item\",\n }),\n subtitle: Type.Optional(\n Type.String({\n title: \"Subtitle\",\n description: \"Optional subtitle or date for this timeline item\",\n }),\n ),\n description: Type.Optional(\n Type.String({\n title: \"Description\",\n description: \"Optional detailed description for this timeline item\",\n }),\n ),\n date: Type.Optional(\n Type.String({\n title: \"Date\",\n description: \"Date or time period for this timeline item\",\n }),\n ),\n icon: Type.Optional(\n Type.String({\n title: \"Icon\",\n description: \"Optional icon name from Iconify for this timeline item\",\n }),\n ),\n status: Type.Optional(\n StringEnum([\"completed\", \"current\", \"upcoming\"], {\n enumNames: [\"Completed\", \"Current\", \"Upcoming\"],\n title: \"Status\",\n description: \"Timeline item status for visual styling\",\n }),\n ),\n});\n\nexport const manifest = defineBrickManifest({\n type: \"timeline\",\n category: \"widgets\",\n name: \"Timeline\",\n description:\n \"A vertical timeline component to display chronological events, milestones, or processes with optional content for each item\",\n icon: BsListCheck,\n consumesMultipleQueryRows: true,\n props: defineProps({\n items: Type.Array(timelineItemSchema, {\n title: \"Timeline Items\",\n description: \"List of timeline items to display\",\n \"ui:field\": \"array\",\n default: [],\n }),\n\n $children: Type.Optional(\n Type.Array(Type.Array(Type.Any()), {\n title: \"Content\",\n description:\n \"Optional content blocks for each timeline item. Each array corresponds to content for the timeline item at the same index.\",\n \"ui:field\": \"hidden\",\n default: [],\n }),\n ),\n\n // Layout options\n layout: Type.Optional(\n StringEnum([\"left\", \"right\", \"alternating\"], {\n enumNames: [\"Left\", \"Right\", \"Alternating\"],\n title: \"Layout\",\n description: \"Timeline layout style\",\n default: \"left\",\n }),\n ),\n\n showConnector: Type.Optional(\n Type.Boolean({\n title: \"Show Connector Line\",\n description: \"Whether to show the connecting line between timeline items\",\n default: true,\n }),\n ),\n\n connectorColor: Type.Optional(\n colorPreset({\n title: \"Connector Color\",\n description: \"Color of the timeline connector line\",\n }),\n ),\n\n // Timeline item styling\n itemSpacing: Type.Optional(\n cssLength({\n title: \"Item Spacing\",\n description: \"Vertical spacing between timeline items\",\n default: \"2rem\",\n }),\n ),\n\n showIcons: Type.Optional(\n Type.Boolean({\n title: \"Show Icons\",\n description: \"Whether to display icons for timeline items\",\n default: true,\n }),\n ),\n iconSize: Type.Optional(\n StringEnum([\"sm\", \"md\", \"lg\"], {\n enumNames: [\"Small\", \"Medium\", \"Large\"],\n title: \"Icon Size\",\n description: \"Size of timeline item icons\",\n default: \"md\",\n }),\n ),\n\n showDates: Type.Optional(\n Type.Boolean({\n title: \"Show Dates\",\n description: \"Whether to display dates for timeline items\",\n default: true,\n }),\n ),\n\n datePosition: Type.Optional(\n StringEnum([\"top\", \"bottom\", \"inline\"], {\n enumNames: [\"Top\", \"Bottom\", \"Inline\"],\n title: \"Date Position\",\n description: \"Position of dates relative to content\",\n default: \"top\",\n }),\n ),\n\n // Styling\n colorPreset: Type.Optional(\n colorPreset({\n title: \"Color Preset\",\n description: \"Color theme for the timeline\",\n }),\n ),\n\n padding: Type.Optional(\n cssLength({\n title: \"Padding\",\n description: \"Internal padding for the timeline container\",\n }),\n ),\n\n border: Type.Optional(\n border({\n title: \"Border\",\n description: \"Border styling for the timeline container\",\n }),\n ),\n\n shadow: Type.Optional(\n shadow({\n title: \"Shadow\",\n description: \"Shadow effect for the timeline container\",\n }),\n ),\n\n rounding: Type.Optional(\n rounding({\n title: \"Rounding\",\n description: \"Corner rounding for the timeline container\",\n }),\n ),\n\n // Content loop support\n loop: Type.Optional(loop()),\n }),\n});\n\nexport type Manifest = typeof manifest;\n\nexport const examples: BrickExample<Manifest>[] = [\n {\n description: \"Basic timeline with milestones\",\n type: \"timeline\",\n props: {\n items: [\n {\n id: \"start\",\n title: \"Project Kickoff\",\n subtitle: \"Planning Phase\",\n date: \"January 2024\",\n description: \"Initial project planning and team assembly\",\n status: \"completed\",\n },\n {\n id: \"development\",\n title: \"Development Phase\",\n subtitle: \"Building the Product\",\n date: \"February - April 2024\",\n description: \"Core development and feature implementation\",\n status: \"completed\",\n },\n {\n id: \"testing\",\n title: \"Testing & QA\",\n subtitle: \"Quality Assurance\",\n date: \"May 2024\",\n description: \"Comprehensive testing and bug fixes\",\n status: \"current\",\n },\n {\n id: \"launch\",\n title: \"Product Launch\",\n subtitle: \"Go Live\",\n date: \"June 2024\",\n description: \"Official product release and marketing campaign\",\n status: \"upcoming\",\n },\n ],\n layout: \"left\",\n showConnector: true,\n showIcons: true,\n showDates: true,\n },\n },\n\n {\n description: \"Alternating timeline with custom colors\",\n type: \"timeline\",\n props: {\n items: [\n {\n title: \"Company Founded\",\n date: \"2020\",\n description: \"Started with a vision to change the industry\",\n },\n {\n title: \"First Product Launch\",\n date: \"2021\",\n description: \"Released our flagship product to market\",\n },\n {\n title: \"Series A Funding\",\n date: \"2022\",\n description: \"Raised $10M to accelerate growth\",\n },\n {\n title: \"International Expansion\",\n date: \"2023\",\n description: \"Opened offices in Europe and Asia\",\n },\n ],\n layout: \"alternating\",\n colorPreset: { color: \"primary-500\" },\n connectorColor: { color: \"primary-300\" },\n itemSpacing: \"3rem\",\n },\n },\n\n {\n description: \"Timeline with content blocks\",\n type: \"timeline\",\n props: {\n items: [\n {\n title: \"Research Phase\",\n date: \"Q1 2024\",\n description: \"Market research and user interviews\",\n },\n {\n title: \"Design Phase\",\n date: \"Q2 2024\",\n description: \"UI/UX design and prototyping\",\n },\n ],\n $children: [\n [\n {\n id: \"research-chart\",\n type: \"text\",\n props: { content: \"Research findings and insights will be displayed here.\" },\n },\n ],\n [\n {\n id: \"design-mockups\",\n type: \"text\",\n props: { content: \"Design mockups and prototypes will be shown here.\" },\n },\n ],\n ],\n },\n },\n\n {\n description: \"Compact timeline without dates\",\n type: \"timeline\",\n props: {\n items: [\n {\n title: \"Initialize Project\",\n description: \"Set up repository and development environment\",\n },\n {\n title: \"Implement Core Features\",\n description: \"Build the main functionality\",\n },\n {\n title: \"Add Tests\",\n description: \"Write unit and integration tests\",\n },\n {\n title: \"Deploy to Production\",\n description: \"Release to production environment\",\n },\n ],\n layout: \"left\",\n showDates: false,\n showIcons: false,\n itemSpacing: \"1.5rem\",\n padding: \"1rem\",\n },\n },\n\n {\n description: \"Timeline with custom icons\",\n type: \"timeline\",\n props: {\n items: [\n {\n title: \"Planning\",\n icon: \"mdi:calendar-check\",\n date: \"Week 1\",\n status: \"completed\",\n },\n {\n title: \"Development\",\n icon: \"mdi:code-braces\",\n date: \"Week 2-4\",\n status: \"completed\",\n },\n {\n title: \"Testing\",\n icon: \"mdi:test-tube\",\n date: \"Week 5\",\n status: \"current\",\n },\n {\n title: \"Deployment\",\n icon: \"mdi:rocket-launch\",\n date: \"Week 6\",\n status: \"upcoming\",\n },\n ],\n iconSize: \"lg\",\n datePosition: \"bottom\",\n },\n },\n\n {\n description: \"Right-aligned timeline\",\n type: \"timeline\",\n props: {\n items: [\n {\n title: \"User Registration Opens\",\n date: \"March 1st\",\n description: \"Early bird registration begins\",\n },\n {\n title: \"Speaker Announcements\",\n date: \"March 15th\",\n description: \"Keynote speakers revealed\",\n },\n {\n title: \"Conference Day\",\n date: \"April 1st\",\n description: \"The main event begins\",\n },\n ],\n layout: \"right\",\n colorPreset: { color: \"secondary-500\" },\n border: { width: \"border\", color: \"secondary-200\" },\n rounding: \"rounded-lg\",\n padding: \"2rem\",\n },\n },\n\n {\n description: \"Timeline with loop data\",\n type: \"timeline\",\n props: {\n items: [],\n loop: {\n over: \"milestones\",\n },\n layout: \"alternating\",\n showConnector: true,\n },\n },\n\n {\n description: \"Styled timeline with shadows\",\n type: \"timeline\",\n props: {\n items: [\n {\n title: \"Design System\",\n subtitle: \"Foundation\",\n date: \"Phase 1\",\n description: \"Establish design tokens and component library\",\n },\n {\n title: \"Component Development\",\n subtitle: \"Implementation\",\n date: \"Phase 2\",\n description: \"Build reusable React components\",\n },\n {\n title: \"Documentation\",\n subtitle: \"Guidelines\",\n date: \"Phase 3\",\n description: \"Create comprehensive usage documentation\",\n },\n ],\n colorPreset: { color: \"secondary-500\" },\n shadow: \"shadow-lg\",\n border: { width: \"border\", color: \"purple-200\" },\n rounding: \"rounded-xl\",\n padding: \"2.5rem\",\n itemSpacing: \"2.5rem\",\n connectorColor: { color: \"secondary-300\" },\n },\n },\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,YAAY;AAOrB,SAAS,mBAAmB;AAM5B,IAAM,qBAAqB,KAAK,OAAO;AAAA,EACrC,IAAI,KAAK,SAAS,KAAK,OAAO,EAAE,OAAO,KAAK,CAAC,CAAC;AAAA,EAC9C,OAAO,KAAK,OAAO;AAAA,IACjB,OAAO;AAAA,IACP,aAAa;AAAA,EACf,CAAC;AAAA,EACD,UAAU,KAAK;AAAA,IACb,KAAK,OAAO;AAAA,MACV,OAAO;AAAA,MACP,aAAa;AAAA,IACf,CAAC;AAAA,EACH;AAAA,EACA,aAAa,KAAK;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O;AAAA,QACL;AAAA,UACE,OAAO;AAAA,UACP,UAAU;AAAA,UACV,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,QACA;AAAA,UACE,OAAO;AAAA,UACP,UAAU;AAAA,UACV,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,QACA;AAAA,UACE,OAAO;AAAA,UACP,UAAU;AAAA,UACV,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,MACF;AAAA,MACA,aAAa,EAAE,OAAO,gBAAgB;AAAA,MACtC,QAAQ;AAAA,MACR,QAAQ,EAAE,OAAO,UAAU,OAAO,aAAa;AAAA,MAC/C,UAAU;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,gBAAgB,EAAE,OAAO,gBAAgB;AAAA,IAC3C;AAAA,EACF;AACF;","names":[]}
|
|
@@ -3,26 +3,25 @@
|
|
|
3
3
|
import {
|
|
4
4
|
fixedPositioned
|
|
5
5
|
} from "./chunk-6WIMWLCJ.js";
|
|
6
|
+
import {
|
|
7
|
+
border
|
|
8
|
+
} from "./chunk-SRYBJ6NQ.js";
|
|
6
9
|
import {
|
|
7
10
|
defineProps,
|
|
8
11
|
group
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
defineBrickManifest
|
|
12
|
-
} from "./chunk-TB3X4LRQ.js";
|
|
12
|
+
} from "./chunk-VTCHJT4O.js";
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
} from "./chunk-
|
|
14
|
+
urlOrPageId
|
|
15
|
+
} from "./chunk-SQXZNGQF.js";
|
|
16
16
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} from "./chunk-UQF52PWK.js";
|
|
17
|
+
shadow
|
|
18
|
+
} from "./chunk-5RCC2STG.js";
|
|
20
19
|
import {
|
|
21
|
-
|
|
22
|
-
} from "./chunk-
|
|
20
|
+
backgroundColor
|
|
21
|
+
} from "./chunk-KKWT3OXF.js";
|
|
23
22
|
import {
|
|
24
|
-
|
|
25
|
-
} from "./chunk-
|
|
23
|
+
defineBrickManifest
|
|
24
|
+
} from "./chunk-J45LSQT6.js";
|
|
26
25
|
|
|
27
26
|
// src/shared/bricks/manifests/sidebar.manifest.ts
|
|
28
27
|
import { VscLayoutSidebarLeftOff } from "react-icons/vsc";
|
|
@@ -47,9 +46,9 @@ var manifest = defineBrickManifest({
|
|
|
47
46
|
group({
|
|
48
47
|
title: "Main element",
|
|
49
48
|
children: {
|
|
50
|
-
backgroundColor: Type.Optional(
|
|
51
|
-
border: Type.Optional(
|
|
52
|
-
shadow: Type.Optional(
|
|
49
|
+
backgroundColor: Type.Optional(backgroundColor()),
|
|
50
|
+
border: Type.Optional(border()),
|
|
51
|
+
shadow: Type.Optional(shadow()),
|
|
53
52
|
fixedPositioned: Type.Optional(fixedPositioned())
|
|
54
53
|
},
|
|
55
54
|
metadata: {
|
|
@@ -64,8 +63,8 @@ var manifest = defineBrickManifest({
|
|
|
64
63
|
navItems: Type.Optional(
|
|
65
64
|
Type.Array(
|
|
66
65
|
Type.Object({
|
|
67
|
-
urlOrPageId:
|
|
68
|
-
label: Type.Optional(
|
|
66
|
+
urlOrPageId: urlOrPageId(),
|
|
67
|
+
label: Type.Optional(Type.String({ title: "Label" }))
|
|
69
68
|
}),
|
|
70
69
|
{ title: "Navigation items", default: [] }
|
|
71
70
|
)
|
|
@@ -102,4 +101,4 @@ export {
|
|
|
102
101
|
manifest,
|
|
103
102
|
examples
|
|
104
103
|
};
|
|
105
|
-
//# sourceMappingURL=chunk-
|
|
104
|
+
//# sourceMappingURL=chunk-U4KZUX37.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shared/bricks/manifests/sidebar.manifest.ts"],"sourcesContent":["import { defineBrickManifest } from \"~/shared/brick-manifest\";\nimport { defineProps, group } from \"../props/helpers\";\nimport { VscLayoutSidebarLeftOff } from \"react-icons/vsc\";\nimport { Type } from \"@sinclair/typebox\";\nimport { urlOrPageId } from \"../props/string\";\nimport { backgroundColor } from \"../props/background\";\nimport { border } from \"../props/border\";\nimport { fixedPositioned } from \"../props/position\";\nimport type { BrickProps } from \"../props/types\";\nimport { shadow } from \"../props/effects\";\nimport type { BrickExample } from \"./_types\";\n\nexport const manifest = defineBrickManifest({\n type: \"sidebar\",\n category: \"layout\",\n name: \"Sidebar\",\n description: \"A sidebar element\",\n inlineDragDisabled: true,\n isGlobalBrick: true,\n duplicatable: false,\n resizable: false,\n movable: false,\n aiInstructions: `\n This brick should be used on most sites/pages for navigation. By default, it will display links\n to the main pages of the site. You can customize the links by using the 'navigation.navItems' prop.\n `.trim(),\n icon: VscLayoutSidebarLeftOff,\n props: defineProps({\n container: Type.Optional(\n group({\n title: \"Main element\",\n children: {\n backgroundColor: Type.Optional(backgroundColor()),\n border: Type.Optional(border()),\n shadow: Type.Optional(shadow()),\n fixedPositioned: Type.Optional(fixedPositioned()),\n },\n metadata: {\n \"ui:responsive\": true,\n },\n }),\n ),\n navigation: Type.Optional(\n group({\n title: \"Links\",\n children: {\n navItems: Type.Optional(\n Type.Array(\n Type.Object({\n urlOrPageId: urlOrPageId(),\n label: Type.Optional(Type.String({ title: \"Label\" })),\n }),\n { title: \"Navigation items\", default: [] },\n ),\n ),\n },\n }),\n ),\n }),\n});\n\nexport type Manifest = typeof manifest;\n\nexport const examples: BrickExample<Manifest>[] = [\n {\n description: \"Standard sidebar with navigation links base on site pages\",\n type: \"sidebar\",\n props: {},\n },\n {\n description: \"Sidebar with specified navigation links\",\n type: \"sidebar\",\n props: {\n container: {\n backgroundColor: \"#f0f0f0\",\n },\n navigation: {\n navItems: [\n { urlOrPageId: \"https://google.com\", label: \"Google\" },\n { urlOrPageId: \"https://bing.com\", label: \"Bing\" },\n ],\n },\n },\n },\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAS,+BAA+B;AACxC,SAAS,YAAY;AASd,IAAM,WAAW,oBAAoB;AAAA,EAC1C,MAAM;AAAA,EACN,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O,SAAS;AAAA,UACrD,EAAE,aAAa,oBAAoB,OAAO,OAAO;AAAA,QACnD;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
pageAttributesSchema
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-T6C3NG2L.js";
|
|
6
6
|
import {
|
|
7
7
|
sectionSchema
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-H6TMBELF.js";
|
|
9
9
|
|
|
10
10
|
// src/shared/page.ts
|
|
11
11
|
import { Type } from "@sinclair/typebox";
|
|
@@ -23,8 +23,15 @@ var pageSchema = Type.Object({
|
|
|
23
23
|
}),
|
|
24
24
|
attributes: pageAttributesSchema
|
|
25
25
|
});
|
|
26
|
+
var versionedPageSchema = Type.Composite([
|
|
27
|
+
pageSchema,
|
|
28
|
+
Type.Object({
|
|
29
|
+
version: Type.String()
|
|
30
|
+
})
|
|
31
|
+
]);
|
|
26
32
|
|
|
27
33
|
export {
|
|
28
|
-
pageSchema
|
|
34
|
+
pageSchema,
|
|
35
|
+
versionedPageSchema
|
|
29
36
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-VSLRTXLF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shared/page.ts"],"sourcesContent":["import { pageAttributesSchema } from \"./attributes\";\nimport { sectionSchema } from \"./bricks\";\nimport { Type, type Static } from \"@sinclair/typebox\";\n\nexport const pageSchema = Type.Object({\n id: Type.String({\n description: \"The unique ID of the page. Use a human readable url-safe slug\",\n examples: [\"home\", \"about-us\", \"products-list\"],\n }),\n label: Type.String({\n description: \"The label (name) of the page\",\n examples: [\"Home\", \"About us\", \"Products\"],\n }),\n sections: Type.Array(sectionSchema, {\n description: \"The sections of the page. See the Section schema\",\n }),\n attributes: pageAttributesSchema,\n});\n\nexport type Page = Static<typeof pageSchema>;\n\nexport const versionedPageSchema = Type.Composite([\n pageSchema,\n Type.Object({\n version: Type.String(),\n }),\n]);\n\nexport type VersionedPage = Static<typeof versionedPageSchema>;\n\n/**\n * Page context represents the page config PLUS:\n * - the pathParams of the actual request.\n * - the resolved data for the page.\n */\nexport type PageContext = VersionedPage & {\n pathParams?: Record<string, string>;\n data?: Record<string, unknown[]>;\n};\n"],"mappings":";;;;;;;;;;AAEA,SAAS,YAAyB;AAE3B,IAAM,aAAa,KAAK,OAAO;AAAA,EACpC,IAAI,KAAK,OAAO;AAAA,IACd,aAAa;AAAA,IACb,UAAU,CAAC,QAAQ,YAAY,eAAe;AAAA,EAChD,CAAC;AAAA,EACD,OAAO,KAAK,OAAO;AAAA,IACjB,aAAa;AAAA,IACb,UAAU,CAAC,QAAQ,YAAY,UAAU;AAAA,EAC3C,CAAC;AAAA,EACD,UAAU,KAAK,MAAM,eAAe;AAAA,IAClC,aAAa;AAAA,EACf,CAAC;AAAA,EACD,YAAY;AACd,CAAC;AAIM,IAAM,sBAAsB,KAAK,UAAU;AAAA,EAChD;AAAA,EACA,KAAK,OAAO;AAAA,IACV,SAAS,KAAK,OAAO;AAAA,EACvB,CAAC;AACH,CAAC;","names":[]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
commonProps
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XXPSM6UA.js";
|
|
6
6
|
|
|
7
7
|
// src/shared/bricks/props/helpers.ts
|
|
8
8
|
import { Type } from "@sinclair/typebox";
|
|
@@ -54,7 +54,7 @@ function defineProps(props, options) {
|
|
|
54
54
|
...options?.noAlignSelf ? {} : { alignSelf },
|
|
55
55
|
...options?.noGrow ? {} : { grow }
|
|
56
56
|
};
|
|
57
|
-
return Type.Object(finalProps,
|
|
57
|
+
return Type.Object(finalProps, options);
|
|
58
58
|
}
|
|
59
59
|
var array = Type.Array;
|
|
60
60
|
|
|
@@ -64,4 +64,4 @@ export {
|
|
|
64
64
|
defineProps,
|
|
65
65
|
array
|
|
66
66
|
};
|
|
67
|
-
//# sourceMappingURL=chunk-
|
|
67
|
+
//# sourceMappingURL=chunk-VTCHJT4O.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/shared/bricks/props/helpers.ts"],"sourcesContent":["/**\n * Helper functions for defining and working with props and groups of props\n */\nimport { type TProperties, Type, type TSchema, type TObject, type ObjectOptions } from \"@sinclair/typebox\";\nimport { commonProps } from \"./common\";\nimport type { PartialBy, PropGroup, GroupMetadata } from \"./types\";\n\nfunction isTObject(schema: TSchema | TProperties): schema is TObject {\n return schema.type === \"object\";\n}\n\nexport function group<T extends TProperties>({\n title,\n children,\n category = \"settings\",\n metadata,\n options,\n}: PartialBy<PropGroup<T>, \"category\">) {\n // check if children is already a TObject\n if (isTObject(children)) {\n const generated = Type.Composite([Type.Object({}), children], {\n title,\n metadata: {\n category,\n group: true,\n ...metadata,\n },\n ...options,\n });\n return generated;\n }\n\n // Create the TypeBox schema with title as a standard property and group-specific info in metadata\n return Type.Object(children, {\n title,\n ...options,\n metadata: {\n category,\n group: true,\n ...metadata,\n },\n });\n}\n\n// Functions to extract metadata from schemas\nexport function getGroupInfo(schema: TSchema) {\n const meta = schema.metadata as GroupMetadata;\n return {\n title: (schema.title ?? schema.metadata?.title) as string | undefined,\n meta,\n tab: meta.groupTab || \"common\",\n };\n}\n\nexport function defineProps<P extends TProperties>(\n props: P,\n options?: ObjectOptions & {\n noGrow?: boolean;\n noAlignSelf?: boolean;\n },\n) {\n const allProps = { ...commonProps, ...props };\n const { alignSelf, grow, ...rest } = allProps;\n const finalProps = {\n ...rest,\n ...(options?.noAlignSelf ? {} : { alignSelf }),\n ...(options?.noGrow ? {} : { grow }),\n } as typeof allProps;\n return Type.Object(finalProps,
|
|
1
|
+
{"version":3,"sources":["../../src/shared/bricks/props/helpers.ts"],"sourcesContent":["/**\n * Helper functions for defining and working with props and groups of props\n */\nimport { type TProperties, Type, type TSchema, type TObject, type ObjectOptions } from \"@sinclair/typebox\";\nimport { commonProps } from \"./common\";\nimport type { PartialBy, PropGroup, GroupMetadata } from \"./types\";\n\nfunction isTObject(schema: TSchema | TProperties): schema is TObject {\n return schema.type === \"object\";\n}\n\nexport function group<T extends TProperties>({\n title,\n children,\n category = \"settings\",\n metadata,\n options,\n}: PartialBy<PropGroup<T>, \"category\">) {\n // check if children is already a TObject\n if (isTObject(children)) {\n const generated = Type.Composite([Type.Object({}), children], {\n title,\n metadata: {\n category,\n group: true,\n ...metadata,\n },\n ...options,\n });\n return generated;\n }\n\n // Create the TypeBox schema with title as a standard property and group-specific info in metadata\n return Type.Object(children, {\n title,\n ...options,\n metadata: {\n category,\n group: true,\n ...metadata,\n },\n });\n}\n\n// Functions to extract metadata from schemas\nexport function getGroupInfo(schema: TSchema) {\n const meta = schema.metadata as GroupMetadata;\n return {\n title: (schema.title ?? schema.metadata?.title) as string | undefined,\n meta,\n tab: meta.groupTab || \"common\",\n };\n}\n\nexport function defineProps<P extends TProperties>(\n props: P,\n options?: ObjectOptions & {\n noGrow?: boolean;\n noAlignSelf?: boolean;\n },\n) {\n const allProps = { ...commonProps, ...props };\n const { alignSelf, grow, ...rest } = allProps;\n const finalProps = {\n ...rest,\n ...(options?.noAlignSelf ? {} : { alignSelf }),\n ...(options?.noGrow ? {} : { grow }),\n } as typeof allProps;\n return Type.Object(finalProps, options);\n}\n\n// export const optional = Type.Optional;\nexport const array = Type.Array;\n"],"mappings":";;;;;;;AAGA,SAA2B,YAA4D;AAIvF,SAAS,UAAU,QAAkD;AACnE,SAAO,OAAO,SAAS;AACzB;AAEO,SAAS,MAA6B;AAAA,EAC3C;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AACF,GAAwC;AAEtC,MAAI,UAAU,QAAQ,GAAG;AACvB,UAAM,YAAY,KAAK,UAAU,CAAC,KAAK,OAAO,CAAC,CAAC,GAAG,QAAQ,GAAG;AAAA,MAC5D;AAAA,MACA,UAAU;AAAA,QACR;AAAA,QACA,OAAO;AAAA,QACP,GAAG;AAAA,MACL;AAAA,MACA,GAAG;AAAA,IACL,CAAC;AACD,WAAO;AAAA,EACT;AAGA,SAAO,KAAK,OAAO,UAAU;AAAA,IAC3B;AAAA,IACA,GAAG;AAAA,IACH,UAAU;AAAA,MACR;AAAA,MACA,OAAO;AAAA,MACP,GAAG;AAAA,IACL;AAAA,EACF,CAAC;AACH;AAGO,SAAS,aAAa,QAAiB;AAC5C,QAAM,OAAO,OAAO;AACpB,SAAO;AAAA,IACL,OAAQ,OAAO,SAAS,OAAO,UAAU;AAAA,IACzC;AAAA,IACA,KAAK,KAAK,YAAY;AAAA,EACxB;AACF;AAEO,SAAS,YACd,OACA,SAIA;AACA,QAAM,WAAW,EAAE,GAAG,aAAa,GAAG,MAAM;AAC5C,QAAM,EAAE,WAAW,MAAM,GAAG,KAAK,IAAI;AACrC,QAAM,aAAa;AAAA,IACjB,GAAG;AAAA,IACH,GAAI,SAAS,cAAc,CAAC,IAAI,EAAE,UAAU;AAAA,IAC5C,GAAI,SAAS,SAAS,CAAC,IAAI,EAAE,KAAK;AAAA,EACpC;AACA,SAAO,KAAK,OAAO,YAAY,OAAO;AACxC;AAGO,IAAM,QAAQ,KAAK;","names":[]}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
defineProps
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VTCHJT4O.js";
|
|
6
6
|
import {
|
|
7
7
|
defineBrickManifest
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-J45LSQT6.js";
|
|
9
9
|
|
|
10
10
|
// src/shared/bricks/manifests/html.manifest.ts
|
|
11
11
|
import { BsCodeSquare } from "react-icons/bs";
|
|
@@ -126,4 +126,4 @@ export {
|
|
|
126
126
|
manifest,
|
|
127
127
|
examples
|
|
128
128
|
};
|
|
129
|
-
//# sourceMappingURL=chunk-
|
|
129
|
+
//# sourceMappingURL=chunk-W2RFDII5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shared/bricks/manifests/html.manifest.ts"],"sourcesContent":["import { defineBrickManifest } from \"~/shared/brick-manifest\";\nimport { defineProps } from \"../props/helpers\";\nimport type { BrickProps } from \"../props/types\";\nimport { BsCodeSquare } from \"react-icons/bs\";\n\nimport { Type } from \"@sinclair/typebox\";\nimport type { BrickExample } from \"./_types\";\n\nexport const manifest = defineBrickManifest({\n type: \"html\",\n name: \"Html\",\n category: \"widgets\",\n description:\n \"A flexible brick that accepts HTML content. Useful for embeding custom HTML or third-party widgets.\",\n aiInstructions:\n \"Use only this brick type when integrating third party widgets or custom HTML content. Most of the time, you should use other bricks that are more secure and easier to use.\",\n staticClasses: \"self-stretch\",\n defaultWidth: {\n mobile: \"auto\",\n desktop: \"300px\",\n },\n icon: BsCodeSquare,\n props: defineProps({\n html: Type.String({\n title: \"HTML Content\",\n description: \"The HTML content to render. Use with caution, as it can introduce security risks.\",\n default: \"<div>Your HTML content here</div>\",\n \"ui:placeholder\": \"<div>Your HTML content here</div>\",\n \"ui:multiline\": true,\n metadata: {\n category: \"content\",\n },\n }),\n }),\n});\n\nexport type Manifest = typeof manifest;\n\nexport const examples: BrickExample<Manifest>[] = [\n {\n description: \"A tally form\",\n type: \"html\",\n props: {\n html: '<iframe data-tally-src=\"https://tally.so/embed/wQZpd8?alignLeft=1&hideTitle=1&transparentBackground=1&dynamicHeight=1\" loading=\"lazy\" width=\"100%\" height=\"282\" frameborder=\"0\" marginheight=\"0\" marginwidth=\"0\" title=\"test\"></iframe>',\n },\n },\n {\n description: \"YouTube video embed\",\n type: \"html\",\n props: {\n html: '<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/dQw4w9WgXcQ\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen></iframe>',\n },\n },\n {\n description: \"Google Maps embed\",\n type: \"html\",\n props: {\n html: '<iframe src=\"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3024.309059887159!2d-74.00849368459473!3d40.71278097932847!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x89c25a165bedccab%3A0xa2008c34c27bfb67!2sWall%20St%2C%20New%20York%2C%20NY%2C%20USA!5e0!3m2!1sen!2sus!4v1620000000000\" width=\"100%\" height=\"300\" style=\"border:0;\" allowfullscreen=\"\" loading=\"lazy\"></iframe>',\n },\n },\n {\n description: \"Twitter tweet embed\",\n type: \"html\",\n props: {\n html: '<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">Just setting up my twttr</p>— Jack Dorsey (@jack) <a href=\"https://twitter.com/jack/status/20?ref_src=twsrc%5Etfw\">March 21, 2006</a></blockquote> <script async src=\"https://platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>',\n },\n },\n {\n description: \"CodePen embed for code showcase\",\n type: \"html\",\n props: {\n html: '<iframe height=\"300\" style=\"width: 100%;\" scrolling=\"no\" title=\"CSS Animation Example\" src=\"https://codepen.io/team/codepen/embed/PNaGbb?height=300&theme-id=light&default-tab=result\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"></iframe>',\n },\n },\n {\n description: \"Calendly scheduling widget\",\n type: \"html\",\n props: {\n html: '<div class=\"calendly-inline-widget\" data-url=\"https://calendly.com/your-name/30min\" style=\"min-width:320px;height:630px;\"></div><script type=\"text/javascript\" src=\"https://assets.calendly.com/assets/external/widget.js\" async></script>',\n },\n },\n {\n description: \"Custom pricing table with CSS styling\",\n type: \"html\",\n props: {\n html: '<div style=\"display: flex; gap: 20px; justify-content: center;\"><div style=\"border: 2px solid #e2e8f0; border-radius: 12px; padding: 24px; text-align: center; background: white;\"><h3 style=\"margin: 0 0 16px; color: #1e293b;\">Basic</h3><div style=\"font-size: 32px; font-weight: bold; color: #0ea5e9;\">$9</div><p style=\"color: #64748b; margin: 8px 0 20px;\">per month</p><ul style=\"list-style: none; padding: 0; margin: 0;\"><li style=\"padding: 8px 0;\">✓ 5 Projects</li><li style=\"padding: 8px 0;\">✓ 10GB Storage</li><li style=\"padding: 8px 0;\">✓ Email Support</li></ul></div></div>',\n },\n },\n {\n description: \"Mailchimp newsletter signup form\",\n type: \"html\",\n props: {\n html: '<div id=\"mc_embed_signup\"><form action=\"https://your-domain.us1.list-manage.com/subscribe/post?u=123456789&id=abcdefghij\" method=\"post\" id=\"mc-embedded-subscribe-form\" name=\"mc-embedded-subscribe-form\" class=\"validate\" target=\"_blank\" novalidate><div id=\"mc_embed_signup_scroll\"><div class=\"mc-field-group\"><label for=\"mce-EMAIL\">Email Address</label><input type=\"email\" value=\"\" name=\"EMAIL\" class=\"required email\" id=\"mce-EMAIL\" style=\"width: 100%; padding: 10px; margin: 8px 0; border: 1px solid #ccc; border-radius: 4px;\"></div><div id=\"mce-responses\" class=\"clear\"><div class=\"response\" id=\"mce-error-response\" style=\"display:none\"></div><div class=\"response\" id=\"mce-success-response\" style=\"display:none\"></div></div><div style=\"position: absolute; left: -5000px;\" aria-hidden=\"true\"><input type=\"text\" name=\"b_123456789_abcdefghij\" tabindex=\"-1\" value=\"\"></div><div class=\"clear\"><input type=\"submit\" value=\"Subscribe\" name=\"subscribe\" id=\"mc-embedded-subscribe\" class=\"button\" style=\"background: #007cba; color: white; padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer;\"></div></div></form></div>',\n },\n },\n {\n description: \"Stripe payment button integration\",\n type: \"html\",\n props: {\n html: '<script async src=\"https://js.stripe.com/v3/buy-button.js\"></script><stripe-buy-button buy-button-id=\"buy_btn_1234567890\" publishable-key=\"pk_test_1234567890\"></stripe-buy-button>',\n },\n },\n {\n description: \"Instagram post embed\",\n type: \"html\",\n props: {\n html: '<blockquote class=\"instagram-media\" data-instgrm-captioned data-instgrm-permalink=\"https://www.instagram.com/p/ABC123/\" data-instgrm-version=\"14\" style=\"background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:540px; min-width:326px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);\"></blockquote><script async src=\"//www.instagram.com/embed.js\"></script>',\n },\n },\n {\n description: \"Custom countdown timer widget\",\n type: \"html\",\n props: {\n html: '<div style=\"text-align: center; padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 12px; color: white;\"><h3 style=\"margin: 0 0 20px; font-size: 24px;\">Event Countdown</h3><div id=\"countdown\" style=\"display: flex; justify-content: center; gap: 20px;\"><div style=\"text-align: center;\"><div style=\"font-size: 32px; font-weight: bold;\">10</div><div style=\"font-size: 14px; opacity: 0.8;\">DAYS</div></div><div style=\"text-align: center;\"><div style=\"font-size: 32px; font-weight: bold;\">15</div><div style=\"font-size: 14px; opacity: 0.8;\">HOURS</div></div><div style=\"text-align: center;\"><div style=\"font-size: 32px; font-weight: bold;\">30</div><div style=\"font-size: 14px; opacity: 0.8;\">MINUTES</div></div></div></div>',\n },\n },\n {\n description: \"Interactive feedback widget with rating stars\",\n type: \"html\",\n props: {\n html: '<div style=\"border: 1px solid #e2e8f0; border-radius: 8px; padding: 24px; background: #f8fafc;\"><h4 style=\"margin: 0 0 16px; color: #1e293b;\">How was your experience?</h4><div style=\"display: flex; gap: 8px; margin: 16px 0;\"><span style=\"font-size: 24px; cursor: pointer; color: #fbbf24;\">★</span><span style=\"font-size: 24px; cursor: pointer; color: #fbbf24;\">★</span><span style=\"font-size: 24px; cursor: pointer; color: #fbbf24;\">★</span><span style=\"font-size: 24px; cursor: pointer; color: #fbbf24;\">★</span><span style=\"font-size: 24px; cursor: pointer; color: #d1d5db;\">★</span></div><textarea placeholder=\"Tell us more about your experience...\" style=\"width: 100%; height: 80px; padding: 12px; border: 1px solid #d1d5db; border-radius: 6px; resize: vertical; font-family: inherit;\"></textarea><button style=\"margin-top: 12px; background: #3b82f6; color: white; padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer;\">Submit Feedback</button></div>',\n },\n },\n];\n"],"mappings":";;;;;;;;;;AAGA,SAAS,oBAAoB;AAE7B,SAAS,YAAY;AAGd,IAAM,WAAW,oBAAoB;AAAA,EAC1C,MAAM;AAAA,EACN,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aACE;AAAA,EACF,gBACE;AAAA,EACF,eAAe;AAAA,EACf,cAAc;AAAA,IACZ,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AAAA,EACA,MAAM;AAAA,EACN,OAAO,YAAY;AAAA,IACjB,MAAM,KAAK,OAAO;AAAA,MAChB,OAAO;AAAA,MACP,aAAa;AAAA,MACb,SAAS;AAAA,MACT,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,MAChB,UAAU;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH,CAAC;AAIM,IAAM,WAAqC;AAAA,EAChD;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
typedRef
|
|
5
|
-
} from "./chunk-A2QPY54H.js";
|
|
6
3
|
import {
|
|
7
4
|
StringEnum
|
|
8
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GDYCCB3B.js";
|
|
9
6
|
|
|
10
7
|
// src/shared/bricks/props/direction.ts
|
|
11
8
|
function direction(options = {}) {
|
|
@@ -13,18 +10,15 @@ function direction(options = {}) {
|
|
|
13
10
|
title: "Direction",
|
|
14
11
|
description: "The direction of the layout",
|
|
15
12
|
enumNames: ["Horizontal", "Vertical"],
|
|
13
|
+
default: "flex-row",
|
|
16
14
|
// $id: "styles:direction",
|
|
17
15
|
"ui:styleId": "styles:direction",
|
|
18
16
|
examples: ["flex-row", "flex-col"],
|
|
19
17
|
...options
|
|
20
18
|
});
|
|
21
19
|
}
|
|
22
|
-
function directionRef(options = {}) {
|
|
23
|
-
return typedRef("styles:direction", options);
|
|
24
|
-
}
|
|
25
20
|
|
|
26
21
|
export {
|
|
27
|
-
direction
|
|
28
|
-
directionRef
|
|
22
|
+
direction
|
|
29
23
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
24
|
+
//# sourceMappingURL=chunk-WPZV3LYL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shared/bricks/props/direction.ts"],"sourcesContent":["import { type SchemaOptions, type Static, type StringOptions, Type } from \"@sinclair/typebox\";\nimport { StringEnum } from \"~/shared/utils/string-enum\";\n\nexport function direction(options: StringOptions = {}) {\n return StringEnum([\"flex-row\", \"flex-col\"], {\n title: \"Direction\",\n description: \"The direction of the layout\",\n enumNames: [\"Horizontal\", \"Vertical\"],\n default: \"flex-row\",\n // $id: \"styles:direction\",\n \"ui:styleId\": \"styles:direction\",\n examples: [\"flex-row\", \"flex-col\"],\n ...options,\n });\n}\n\nexport type DirectionSettings = Static<ReturnType<typeof direction>>;\n"],"mappings":";;;;;;;AAGO,SAAS,UAAU,UAAyB,CAAC,GAAG;AACrD,SAAO,WAAW,CAAC,YAAY,UAAU,GAAG;AAAA,IAC1C,OAAO;AAAA,IACP,aAAa;AAAA,IACb,WAAW,CAAC,cAAc,UAAU;AAAA,IACpC,SAAS;AAAA;AAAA,IAET,cAAc;AAAA,IACd,UAAU,CAAC,YAAY,UAAU;AAAA,IACjC,GAAG;AAAA,EACL,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
queryFilter
|
|
5
|
+
} from "./chunk-EMF5TCPX.js";
|
|
6
|
+
|
|
7
|
+
// src/shared/bricks/props/dynamic.ts
|
|
8
|
+
import { Type } from "@sinclair/typebox";
|
|
9
|
+
function queryUse() {
|
|
10
|
+
return Type.Object(
|
|
11
|
+
{
|
|
12
|
+
queryId: Type.String({
|
|
13
|
+
description: "The Site Query ID to use."
|
|
14
|
+
}),
|
|
15
|
+
alias: Type.String({
|
|
16
|
+
title: "Alias",
|
|
17
|
+
minLength: 1,
|
|
18
|
+
maxLength: 100,
|
|
19
|
+
pattern: "^[a-zA-Z0-9_]+$",
|
|
20
|
+
description: "Alias for the query results, used in dynamic content. Use a simple keyword without spaces or special characters. Aliases are unique across the page.",
|
|
21
|
+
"ai:instructions": "Use a simple keyword without spaces or special characters. Aliases are unique across the page. You can use the same query several times with different aliases in order to, for example, apply different parameters to the same query."
|
|
22
|
+
}),
|
|
23
|
+
params: Type.Optional(
|
|
24
|
+
Type.Array(queryFilter, {
|
|
25
|
+
description: "Additional query parameters/filters to apply to the query. One can use placeholders in values like ':slug' to reference URL parameters.",
|
|
26
|
+
title: "Query Parameters",
|
|
27
|
+
default: []
|
|
28
|
+
})
|
|
29
|
+
)
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
title: "Query",
|
|
33
|
+
description: "When set, this brick will loop through the results of the query and render the content for each item.",
|
|
34
|
+
// $id: "content:queryUse",
|
|
35
|
+
"ui:field": "query",
|
|
36
|
+
metadata: {
|
|
37
|
+
category: "content"
|
|
38
|
+
},
|
|
39
|
+
examples: [
|
|
40
|
+
{ queryId: "get-latest-posts", alias: "latestPosts" },
|
|
41
|
+
{
|
|
42
|
+
queryId: "get-user-profile",
|
|
43
|
+
alias: "userProfile",
|
|
44
|
+
params: [{ field: "userId", op: "eq", value: ":slug" }]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
queryId: "get-posts-by-category",
|
|
48
|
+
alias: "postsByCategory",
|
|
49
|
+
params: [{ field: "category", op: "eq", value: ":slug" }]
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
function loop(options = {}) {
|
|
56
|
+
return Type.Object(
|
|
57
|
+
{
|
|
58
|
+
over: Type.String({
|
|
59
|
+
title: "Over",
|
|
60
|
+
description: "The query alias to loop over. If not set, the brick will be rendered only once.",
|
|
61
|
+
"ai:instructions": "Specify the Query Alias to loop over the results."
|
|
62
|
+
}),
|
|
63
|
+
overrideLimit: Type.Optional(
|
|
64
|
+
Type.Number({
|
|
65
|
+
minimum: 1,
|
|
66
|
+
description: "Override the limit of items to loop through. If not set, it will use the default limit of the query. If set to 1, it will not loop and will render only the first item."
|
|
67
|
+
})
|
|
68
|
+
)
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
// $id: "content:loop",
|
|
72
|
+
title: "Repeat over",
|
|
73
|
+
description: "Repeat this brick for each item in the specified query results.",
|
|
74
|
+
"ui:field": "loop",
|
|
75
|
+
"ui:hidden-if": "no-page-queries",
|
|
76
|
+
metadata: {
|
|
77
|
+
category: "content"
|
|
78
|
+
},
|
|
79
|
+
examples: [
|
|
80
|
+
{
|
|
81
|
+
over: "latestBlogPosts",
|
|
82
|
+
overrideLimit: 5
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
over: "featuredProducts",
|
|
86
|
+
overrideLimit: 3
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
over: "popularProducts"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
...options
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export {
|
|
98
|
+
queryUse,
|
|
99
|
+
loop
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=chunk-XFZQGRRL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shared/bricks/props/dynamic.ts"],"sourcesContent":["import { type ObjectOptions, Type, type Static } from \"@sinclair/typebox\";\nimport { queryFilter } from \"~/shared/datasources/types\";\n\nexport function queryUse() {\n return Type.Object(\n {\n queryId: Type.String({\n description: \"The Site Query ID to use.\",\n }),\n alias: Type.String({\n title: \"Alias\",\n minLength: 1,\n maxLength: 100,\n pattern: \"^[a-zA-Z0-9_]+$\",\n description:\n \"Alias for the query results, used in dynamic content. Use a simple keyword without spaces or special characters. Aliases are unique across the page.\",\n \"ai:instructions\":\n \"Use a simple keyword without spaces or special characters. Aliases are unique across the page. You can use the same query several times with different aliases in order to, for example, apply different parameters to the same query.\",\n }),\n params: Type.Optional(\n Type.Array(queryFilter, {\n description:\n \"Additional query parameters/filters to apply to the query. One can use placeholders in values like ':slug' to reference URL parameters.\",\n title: \"Query Parameters\",\n default: [],\n }),\n ),\n },\n {\n title: \"Query\",\n description:\n \"When set, this brick will loop through the results of the query and render the content for each item.\",\n // $id: \"content:queryUse\",\n \"ui:field\": \"query\",\n metadata: {\n category: \"content\",\n },\n examples: [\n { queryId: \"get-latest-posts\", alias: \"latestPosts\" },\n {\n queryId: \"get-user-profile\",\n alias: \"userProfile\",\n params: [{ field: \"userId\", op: \"eq\", value: \":slug\" }],\n },\n {\n queryId: \"get-posts-by-category\",\n alias: \"postsByCategory\",\n params: [{ field: \"category\", op: \"eq\", value: \":slug\" }],\n },\n ],\n },\n );\n}\n\nexport type QueryUseSettings = Static<ReturnType<typeof queryUse>>;\n\nexport function loop(options: ObjectOptions = {}) {\n return Type.Object(\n {\n over: Type.String({\n title: \"Over\",\n description: \"The query alias to loop over. If not set, the brick will be rendered only once.\",\n \"ai:instructions\": \"Specify the Query Alias to loop over the results.\",\n }),\n overrideLimit: Type.Optional(\n Type.Number({\n minimum: 1,\n description:\n \"Override the limit of items to loop through. If not set, it will use the default limit of the query. If set to 1, it will not loop and will render only the first item.\",\n }),\n ),\n },\n {\n // $id: \"content:loop\",\n title: \"Repeat over\",\n description: \"Repeat this brick for each item in the specified query results.\",\n \"ui:field\": \"loop\",\n \"ui:hidden-if\": \"no-page-queries\",\n metadata: {\n category: \"content\",\n },\n examples: [\n {\n over: \"latestBlogPosts\",\n overrideLimit: 5,\n },\n {\n over: \"featuredProducts\",\n overrideLimit: 3,\n },\n {\n over: \"popularProducts\",\n },\n ],\n ...options,\n },\n );\n}\n\nexport type LoopSettings = Static<ReturnType<typeof loop>>;\n"],"mappings":";;;;;;;AAAA,SAA6B,YAAyB;AAG/C,SAAS,WAAW;AACzB,SAAO,KAAK;AAAA,IACV;AAAA,MACE,SAAS,KAAK,OAAO;AAAA,QACnB,aAAa;AAAA,MACf,CAAC;AAAA,MACD,OAAO,KAAK,OAAO;AAAA,QACjB,OAAO;AAAA,QACP,WAAW;AAAA,QACX,WAAW;AAAA,QACX,SAAS;AAAA,QACT,aACE;AAAA,QACF,mBACE;AAAA,MACJ,CAAC;AAAA,MACD,QAAQ,KAAK;AAAA,QACX,KAAK,MAAM,aAAa;AAAA,UACtB,aACE;AAAA,UACF,OAAO;AAAA,UACP,SAAS,CAAC;AAAA,QACZ,CAAC;AAAA,MACH;AAAA,IACF;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,aACE;AAAA;AAAA,MAEF,YAAY;AAAA,MACZ,UAAU;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MACA,UAAU;AAAA,QACR,EAAE,SAAS,oBAAoB,OAAO,cAAc;AAAA,QACpD;AAAA,UACE,SAAS;AAAA,UACT,OAAO;AAAA,UACP,QAAQ,CAAC,EAAE,OAAO,UAAU,IAAI,MAAM,OAAO,QAAQ,CAAC;AAAA,QACxD;AAAA,QACA;AAAA,UACE,SAAS;AAAA,UACT,OAAO;AAAA,UACP,QAAQ,CAAC,EAAE,OAAO,YAAY,IAAI,MAAM,OAAO,QAAQ,CAAC;AAAA,QAC1D;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAIO,SAAS,KAAK,UAAyB,CAAC,GAAG;AAChD,SAAO,KAAK;AAAA,IACV;AAAA,MACE,MAAM,KAAK,OAAO;AAAA,QAChB,OAAO;AAAA,QACP,aAAa;AAAA,QACb,mBAAmB;AAAA,MACrB,CAAC;AAAA,MACD,eA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