@upstart.gg/sdk 0.0.133 → 0.0.135
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 +1 -2
- package/dist/shared/ai/schemas.d.ts.map +1 -1
- package/dist/shared/ai/schemas.js +28 -1
- package/dist/shared/ai/schemas.js.map +1 -1
- package/dist/shared/ai/types.d.ts +15 -1
- package/dist/shared/ai/types.d.ts.map +1 -1
- package/dist/shared/ajv.js +6861 -1
- package/dist/shared/ajv.js.map +1 -1
- package/dist/shared/analytics/init.js +20 -1
- package/dist/shared/analytics/init.js.map +1 -1
- package/dist/shared/analytics/track.js +24 -1
- package/dist/shared/analytics/track.js.map +1 -1
- package/dist/shared/attributes.d.ts +97 -30
- package/dist/shared/attributes.d.ts.map +1 -1
- package/dist/shared/attributes.js +46 -1
- package/dist/shared/brick-manifest.d.ts +1 -1
- package/dist/shared/brick-manifest.js +26 -1
- package/dist/shared/bricks/manifests/accordion.manifest.d.ts +2 -2
- package/dist/shared/bricks/manifests/accordion.manifest.js +29 -1
- package/dist/shared/bricks/manifests/all-manifests.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/all-manifests.js +59 -1
- package/dist/shared/bricks/manifests/box.manifest.d.ts +2 -2
- package/dist/shared/bricks/manifests/box.manifest.js +28 -1
- package/dist/shared/bricks/manifests/button.manifest.d.ts +2 -2
- package/dist/shared/bricks/manifests/button.manifest.js +28 -1
- package/dist/shared/bricks/manifests/card.manifest.d.ts +3 -3
- package/dist/shared/bricks/manifests/card.manifest.js +28 -1
- package/dist/shared/bricks/manifests/carousel.manifest.d.ts +2 -2
- package/dist/shared/bricks/manifests/carousel.manifest.js +28 -1
- package/dist/shared/bricks/manifests/footer.manifest.d.ts +4 -4
- package/dist/shared/bricks/manifests/footer.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/footer.manifest.js +30 -1
- package/dist/shared/bricks/manifests/form.manifest.d.ts +3 -3
- package/dist/shared/bricks/manifests/form.manifest.js +29 -1
- package/dist/shared/bricks/manifests/hero.manifest.d.ts +2 -2
- package/dist/shared/bricks/manifests/hero.manifest.js +28 -1
- package/dist/shared/bricks/manifests/html.manifest.d.ts +2 -2
- package/dist/shared/bricks/manifests/html.manifest.js +28 -1
- package/dist/shared/bricks/manifests/icon.manifest.d.ts +2 -2
- package/dist/shared/bricks/manifests/icon.manifest.js +28 -1
- package/dist/shared/bricks/manifests/image.manifest.d.ts +2 -2
- package/dist/shared/bricks/manifests/image.manifest.js +28 -1
- package/dist/shared/bricks/manifests/images-gallery.manifest.d.ts +2 -2
- package/dist/shared/bricks/manifests/images-gallery.manifest.js +28 -1
- package/dist/shared/bricks/manifests/map.manifest.d.ts +2 -2
- package/dist/shared/bricks/manifests/map.manifest.js +31 -1
- package/dist/shared/bricks/manifests/navbar.manifest.d.ts +4 -4
- package/dist/shared/bricks/manifests/navbar.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/navbar.manifest.js +31 -1
- package/dist/shared/bricks/manifests/sidebar.manifest.d.ts +2 -2
- package/dist/shared/bricks/manifests/sidebar.manifest.js +29 -1
- package/dist/shared/bricks/manifests/social-links.manifest.d.ts +2 -2
- package/dist/shared/bricks/manifests/social-links.manifest.js +28 -1
- package/dist/shared/bricks/manifests/spacer.manifest.d.ts +2 -2
- package/dist/shared/bricks/manifests/spacer.manifest.js +28 -1
- package/dist/shared/bricks/manifests/table.manifest.d.ts +91 -0
- package/dist/shared/bricks/manifests/table.manifest.d.ts.map +1 -0
- package/dist/shared/bricks/manifests/table.manifest.js +31 -0
- package/dist/shared/bricks/manifests/tabs.manifest.d.ts +90 -0
- package/dist/shared/bricks/manifests/tabs.manifest.d.ts.map +1 -0
- package/dist/shared/bricks/manifests/tabs.manifest.js +31 -0
- package/dist/shared/bricks/manifests/tabs.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/testimonials.manifest.d.ts +2 -2
- package/dist/shared/bricks/manifests/testimonials.manifest.js +28 -1
- package/dist/shared/bricks/manifests/text.manifest.d.ts +2 -2
- package/dist/shared/bricks/manifests/text.manifest.js +28 -1
- package/dist/shared/bricks/manifests/timeline.manifest.d.ts +101 -0
- package/dist/shared/bricks/manifests/timeline.manifest.d.ts.map +1 -0
- package/dist/shared/bricks/manifests/timeline.manifest.js +31 -0
- package/dist/shared/bricks/manifests/timeline.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/video.manifest.d.ts +2 -2
- package/dist/shared/bricks/manifests/video.manifest.js +28 -1
- package/dist/shared/bricks/props/align.d.ts +2 -2
- package/dist/shared/bricks/props/align.js +19 -1
- package/dist/shared/bricks/props/background.d.ts +4 -4
- package/dist/shared/bricks/props/background.js +15 -1
- package/dist/shared/bricks/props/boolean.js +7 -1
- package/dist/shared/bricks/props/border.js +16 -1
- package/dist/shared/bricks/props/color-preset.d.ts.map +1 -1
- package/dist/shared/bricks/props/color-preset.js +13 -1
- package/dist/shared/bricks/props/color.js +14 -1
- package/dist/shared/bricks/props/common.d.ts +2 -2
- package/dist/shared/bricks/props/common.js +13 -1
- package/dist/shared/bricks/props/css-length.js +14 -1
- package/dist/shared/bricks/props/datarecord.js +7 -1
- package/dist/shared/bricks/props/datasource.d.ts +1 -1
- package/dist/shared/bricks/props/datasource.js +86 -1
- package/dist/shared/bricks/props/datasource.js.map +1 -1
- package/dist/shared/bricks/props/date.js +9 -1
- package/dist/shared/bricks/props/direction.js +11 -1
- package/dist/shared/bricks/props/dynamic.d.ts.map +1 -1
- package/dist/shared/bricks/props/dynamic.js +30 -1
- package/dist/shared/bricks/props/effects.js +17 -1
- package/dist/shared/bricks/props/file.js +15 -1
- package/dist/shared/bricks/props/file.js.map +1 -1
- package/dist/shared/bricks/props/geolocation.js +44 -1
- package/dist/shared/bricks/props/geolocation.js.map +1 -1
- package/dist/shared/bricks/props/helpers.d.ts +1 -1
- package/dist/shared/bricks/props/helpers.js +18 -1
- package/dist/shared/bricks/props/image.js +11 -1
- package/dist/shared/bricks/props/number.js +7 -1
- package/dist/shared/bricks/props/position.js +7 -1
- package/dist/shared/bricks/props/string.js +18 -1
- package/dist/shared/bricks/props/tags.js +10 -1
- package/dist/shared/bricks/props/text.js +19 -1
- package/dist/shared/bricks.d.ts +56 -44
- package/dist/shared/bricks.d.ts.map +1 -1
- package/dist/shared/bricks.js +79 -1
- package/dist/shared/chunk-2BPYOTKA.js +21 -0
- package/dist/shared/{chunk-WHTPGWUV.js.map → chunk-2BPYOTKA.js.map} +1 -1
- package/dist/shared/chunk-2HO4FHLM.js +456 -0
- package/dist/shared/{chunk-I3VL6SRH.js.map → chunk-2HO4FHLM.js.map} +1 -1
- package/dist/shared/chunk-2RK3CPYJ.js +74 -0
- package/dist/shared/{chunk-W33JMRRN.js.map → chunk-2RK3CPYJ.js.map} +1 -1
- package/dist/shared/chunk-3KLRW4I2.js +560 -0
- package/dist/shared/{chunk-B3EATRFX.js.map → chunk-3KLRW4I2.js.map} +1 -1
- package/dist/shared/chunk-3ZDN5BWN.js +18 -0
- package/dist/shared/{chunk-OIY3EPHO.js.map → chunk-3ZDN5BWN.js.map} +1 -1
- package/dist/shared/chunk-4WI23M7W.js +30 -0
- package/dist/shared/chunk-4WI23M7W.js.map +1 -0
- package/dist/shared/chunk-55C6MTX2.js +21 -0
- package/dist/shared/{chunk-KBHDY425.js.map → chunk-55C6MTX2.js.map} +1 -1
- package/dist/shared/chunk-6E42XWFH.js +103 -0
- package/dist/shared/{chunk-ZA3GAB4H.js.map → chunk-6E42XWFH.js.map} +1 -1
- package/dist/shared/chunk-6TVVKUWM.js +15 -0
- package/dist/shared/{chunk-4WDWJA3N.js.map → chunk-6TVVKUWM.js.map} +1 -1
- package/dist/shared/chunk-6WIMWLCJ.js +17 -0
- package/dist/shared/{chunk-KYY3PHP7.js.map → chunk-6WIMWLCJ.js.map} +1 -1
- package/dist/shared/chunk-7LAWWRU7.js +21 -0
- package/dist/shared/{chunk-IUXCWWGO.js.map → chunk-7LAWWRU7.js.map} +1 -1
- package/dist/shared/chunk-A2QPY54H.js +13 -0
- package/dist/shared/{chunk-KFM6KXSE.js.map → chunk-A2QPY54H.js.map} +1 -1
- package/dist/shared/chunk-BHC2A43S.js +67 -0
- package/dist/shared/{chunk-3YVJ2ELD.js.map → chunk-BHC2A43S.js.map} +1 -1
- package/dist/shared/chunk-BMWRR4DI.js +572 -0
- package/dist/shared/chunk-BMWRR4DI.js.map +1 -0
- package/dist/shared/chunk-BPBKHEQ5.js +39 -0
- package/dist/shared/{chunk-OHNYCXPX.js.map → chunk-BPBKHEQ5.js.map} +1 -1
- package/dist/shared/chunk-BW6EFRSF.js +794 -0
- package/dist/shared/chunk-BW6EFRSF.js.map +1 -0
- package/dist/shared/chunk-CKFRSHR2.js +105 -0
- package/dist/shared/{chunk-CFF6Q7O7.js.map → chunk-CKFRSHR2.js.map} +1 -1
- package/dist/shared/chunk-CSF2WQX2.js +60 -0
- package/dist/shared/{chunk-GLS7HPIZ.js.map → chunk-CSF2WQX2.js.map} +1 -1
- package/dist/shared/chunk-D4YQ6ABM.js +338 -0
- package/dist/shared/{chunk-PXI7AHWS.js.map → chunk-D4YQ6ABM.js.map} +1 -1
- package/dist/shared/chunk-DRTGM2UJ.js +129 -0
- package/dist/shared/{chunk-FLOMNC6J.js.map → chunk-DRTGM2UJ.js.map} +1 -1
- package/dist/shared/chunk-EQMU6NIU.js +1222 -0
- package/dist/shared/chunk-EQMU6NIU.js.map +1 -0
- package/dist/shared/chunk-EWSPTRDL.js +378 -0
- package/dist/shared/{chunk-QX6OGRRT.js.map → chunk-EWSPTRDL.js.map} +1 -1
- package/dist/shared/chunk-F22LDHEO.js +105 -0
- package/dist/shared/{chunk-5YRC3IT3.js.map → chunk-F22LDHEO.js.map} +1 -1
- package/dist/shared/chunk-FVU5PXRC.js +244 -0
- package/dist/shared/chunk-FVU5PXRC.js.map +1 -0
- package/dist/shared/chunk-GCQURRVB.js +837 -0
- package/dist/shared/{chunk-WYVJE6J5.js.map → chunk-GCQURRVB.js.map} +1 -1
- package/dist/shared/chunk-GPCI2N2A.js +395 -0
- package/dist/shared/{chunk-WBZW5LVH.js.map → chunk-GPCI2N2A.js.map} +1 -1
- package/dist/shared/chunk-GRMY35BU.js +722 -0
- package/dist/shared/{chunk-NJGXC7D6.js.map → chunk-GRMY35BU.js.map} +1 -1
- package/dist/shared/chunk-HPCCD6V5.js +17 -0
- package/dist/shared/{chunk-6I3ONVU6.js.map → chunk-HPCCD6V5.js.map} +1 -1
- package/dist/shared/chunk-JK2FWFJU.js +15 -0
- package/dist/shared/{chunk-JMN3HTZU.js.map → chunk-JK2FWFJU.js.map} +1 -1
- package/dist/shared/chunk-KNREHAPN.js +13 -0
- package/dist/shared/{chunk-KSEURRVZ.js.map → chunk-KNREHAPN.js.map} +1 -1
- package/dist/shared/chunk-KT7SSWMM.js +24 -0
- package/dist/shared/{chunk-KO5FPOWZ.js.map → chunk-KT7SSWMM.js.map} +1 -1
- package/dist/shared/chunk-LXAO3JA6.js +368 -0
- package/dist/shared/chunk-LXAO3JA6.js.map +1 -0
- package/dist/shared/chunk-MLZT7MRQ.js +538 -0
- package/dist/shared/chunk-MLZT7MRQ.js.map +1 -0
- package/dist/shared/chunk-NT3IW52F.js +260 -0
- package/dist/shared/chunk-NT3IW52F.js.map +1 -0
- package/dist/shared/chunk-NTLAKMMQ.js +94 -0
- package/dist/shared/{chunk-ZTZJHY4E.js.map → chunk-NTLAKMMQ.js.map} +1 -1
- package/dist/shared/chunk-O5PLB3YB.js +413 -0
- package/dist/shared/chunk-O5PLB3YB.js.map +1 -0
- package/dist/shared/chunk-O5PQISX4.js +51 -0
- package/dist/shared/{chunk-VEDQV5XO.js.map → chunk-O5PQISX4.js.map} +1 -1
- package/dist/shared/chunk-OJP4HMJT.js +22 -0
- package/dist/shared/{chunk-6HLU4UI2.js.map → chunk-OJP4HMJT.js.map} +1 -1
- package/dist/shared/chunk-OSJ6KGPX.js +16 -0
- package/dist/shared/{chunk-GPEMPZXK.js.map → chunk-OSJ6KGPX.js.map} +1 -1
- package/dist/shared/chunk-OXYXZHP2.js +48 -0
- package/dist/shared/{chunk-5O4Z3YQY.js.map → chunk-OXYXZHP2.js.map} +1 -1
- package/dist/shared/chunk-P3RH5URN.js +230 -0
- package/dist/shared/{chunk-R6ATC4TC.js.map → chunk-P3RH5URN.js.map} +1 -1
- package/dist/shared/chunk-Q4NPPLEU.js +34 -0
- package/dist/shared/{chunk-QWGUMKZC.js.map → chunk-Q4NPPLEU.js.map} +1 -1
- package/dist/shared/chunk-QL3T5HJQ.js +59 -0
- package/dist/shared/{chunk-E6XEI7IK.js.map → chunk-QL3T5HJQ.js.map} +1 -1
- package/dist/shared/chunk-QLQVDZIL.js +11 -0
- package/dist/shared/{chunk-KLD3P5XH.js.map → chunk-QLQVDZIL.js.map} +1 -1
- package/dist/shared/chunk-QQQ3FYPG.js +248 -0
- package/dist/shared/{chunk-SXHDQ64Z.js.map → chunk-QQQ3FYPG.js.map} +1 -1
- package/dist/shared/chunk-QSND5IWT.js +165 -0
- package/dist/shared/{chunk-ZQPXQCY2.js.map → chunk-QSND5IWT.js.map} +1 -1
- package/dist/shared/chunk-RV7AYVFV.js +75 -0
- package/dist/shared/{chunk-DHI3IBOD.js.map → chunk-RV7AYVFV.js.map} +1 -1
- package/dist/shared/chunk-SE6O65HC.js +44 -0
- package/dist/shared/{chunk-NM5MMPCF.js.map → chunk-SE6O65HC.js.map} +1 -1
- package/dist/shared/chunk-SHUGHJ7V.js +519 -0
- package/dist/shared/{chunk-IKC3FK7L.js.map → chunk-SHUGHJ7V.js.map} +1 -1
- package/dist/shared/chunk-TB3X4LRQ.js +56 -0
- package/dist/shared/{chunk-RJYZ5FAR.js.map → chunk-TB3X4LRQ.js.map} +1 -1
- package/dist/shared/chunk-TEO6TJOM.js +212 -0
- package/dist/shared/chunk-TEO6TJOM.js.map +1 -0
- package/dist/shared/chunk-TFGGYU6Y.js +394 -0
- package/dist/shared/{chunk-CZRCW5EN.js.map → chunk-TFGGYU6Y.js.map} +1 -1
- package/dist/shared/chunk-TKMWY2VN.js +18 -0
- package/dist/shared/{chunk-RDZK73KV.js.map → chunk-TKMWY2VN.js.map} +1 -1
- package/dist/shared/chunk-TNMNMYOB.js +69 -0
- package/dist/shared/{chunk-4BTB3MU2.js.map → chunk-TNMNMYOB.js.map} +1 -1
- package/dist/shared/chunk-U7TVEPKA.js +432 -0
- package/dist/shared/chunk-U7TVEPKA.js.map +1 -0
- package/dist/shared/chunk-UQF52PWK.js +70 -0
- package/dist/shared/{chunk-A3GF4PYW.js.map → chunk-UQF52PWK.js.map} +1 -1
- package/dist/shared/chunk-V3UA3LRK.js +253 -0
- package/dist/shared/{chunk-G5CJU6RD.js.map → chunk-V3UA3LRK.js.map} +1 -1
- package/dist/shared/chunk-W6MRYRGJ.js +100 -0
- package/dist/shared/{chunk-CCI4C3TM.js.map → chunk-W6MRYRGJ.js.map} +1 -1
- package/dist/shared/chunk-WGDUJSSS.js +462 -0
- package/dist/shared/chunk-WGDUJSSS.js.map +1 -0
- package/dist/shared/chunk-WKN566LN.js +29 -0
- package/dist/shared/{chunk-Q4H4QEMB.js.map → chunk-WKN566LN.js.map} +1 -1
- package/dist/shared/chunk-X6N463D4.js +222 -0
- package/dist/shared/{chunk-IKHZD2JH.js.map → chunk-X6N463D4.js.map} +1 -1
- package/dist/shared/chunk-X75YV73Q.js +178 -0
- package/dist/shared/{chunk-PLSV746R.js.map → chunk-X75YV73Q.js.map} +1 -1
- package/dist/shared/chunk-XCWMZVF5.js +89 -0
- package/dist/shared/{chunk-ZFCUSWMT.js.map → chunk-XCWMZVF5.js.map} +1 -1
- package/dist/shared/chunk-XCZVD5H6.js +13 -0
- package/dist/shared/{chunk-HAGKVQOW.js.map → chunk-XCZVD5H6.js.map} +1 -1
- package/dist/shared/chunk-XZ6WJZHN.js +10 -0
- package/dist/shared/{chunk-DCH4ZKWT.js.map → chunk-XZ6WJZHN.js.map} +1 -1
- package/dist/shared/chunk-Y74LZNND.js +30 -0
- package/dist/shared/{chunk-GACHLACT.js.map → chunk-Y74LZNND.js.map} +1 -1
- package/dist/shared/chunk-Z2NTDFB4.js +505 -0
- package/dist/shared/{chunk-SQ5T4AT5.js.map → chunk-Z2NTDFB4.js.map} +1 -1
- package/dist/shared/chunk-Z35I5JM5.js +131 -0
- package/dist/shared/{chunk-PSTFJ5IJ.js.map → chunk-Z35I5JM5.js.map} +1 -1
- package/dist/shared/chunk-ZEFOWKYP.js +44 -0
- package/dist/shared/{chunk-DQ7PRWTG.js.map → chunk-ZEFOWKYP.js.map} +1 -1
- package/dist/shared/chunk-ZGQ3AQBG.js +33 -0
- package/dist/shared/chunk-ZGQ3AQBG.js.map +1 -0
- package/dist/shared/chunk-ZLYIRH2B.js +68 -0
- package/dist/shared/{chunk-SWLUQVK7.js.map → chunk-ZLYIRH2B.js.map} +1 -1
- package/dist/shared/datarecords/external/airtable/handler.js +377 -1
- package/dist/shared/datarecords/external/airtable/handler.js.map +1 -1
- package/dist/shared/datarecords/external/airtable/oauth/config.js +15 -1
- package/dist/shared/datarecords/external/airtable/oauth/config.js.map +1 -1
- package/dist/shared/datarecords/external/airtable/types.js +11 -1
- package/dist/shared/datarecords/external/generic-webhook/handler.js +14 -1
- package/dist/shared/datarecords/external/generic-webhook/handler.js.map +1 -1
- package/dist/shared/datarecords/external/generic-webhook/options.js +16 -1
- package/dist/shared/datarecords/external/generic-webhook/options.js.map +1 -1
- package/dist/shared/datarecords/external/google/oauth/config.js +35 -1
- package/dist/shared/datarecords/external/google/oauth/config.js.map +1 -1
- package/dist/shared/datarecords/external/google/sheets/client.js +7 -1
- package/dist/shared/datarecords/external/google/sheets/handler.js +184 -5
- package/dist/shared/datarecords/external/google/sheets/handler.js.map +1 -1
- package/dist/shared/datarecords/external/google/sheets/types.js +7 -1
- package/dist/shared/datarecords/external/notion/handler.js +397 -1
- package/dist/shared/datarecords/external/notion/handler.js.map +1 -1
- package/dist/shared/datarecords/external/notion/oauth/config.js +11 -1
- package/dist/shared/datarecords/external/notion/oauth/config.js.map +1 -1
- package/dist/shared/datarecords/external/notion/types.js +7 -1
- package/dist/shared/datarecords/types.d.ts +3 -3
- package/dist/shared/datarecords/types.js +16 -1
- package/dist/shared/datarecords.js +9 -1
- package/dist/shared/datarecords.js.map +1 -1
- package/dist/shared/datasources/external/facebook/posts/fetcher.js +49 -1
- package/dist/shared/datasources/external/facebook/posts/fetcher.js.map +1 -1
- package/dist/shared/datasources/external/facebook/posts/schema.js +36 -1
- package/dist/shared/datasources/external/facebook/posts/schema.js.map +1 -1
- package/dist/shared/datasources/external/http-json/fetcher.js +29 -1
- package/dist/shared/datasources/external/http-json/fetcher.js.map +1 -1
- package/dist/shared/datasources/external/http-json/options.js +11 -1
- package/dist/shared/datasources/external/http-json/options.js.map +1 -1
- package/dist/shared/datasources/external/http-json/schema.js +10 -1
- package/dist/shared/datasources/external/http-json/schema.js.map +1 -1
- package/dist/shared/datasources/external/instagram/feed/fetcher.js +29 -1
- package/dist/shared/datasources/external/instagram/feed/fetcher.js.map +1 -1
- package/dist/shared/datasources/external/instagram/feed/schema.js +26 -1
- package/dist/shared/datasources/external/instagram/feed/schema.js.map +1 -1
- package/dist/shared/datasources/external/mastodon/account/fetcher.js +7 -1
- package/dist/shared/datasources/external/mastodon/account/schema.js +7 -1
- package/dist/shared/datasources/external/mastodon/options.js +10 -1
- package/dist/shared/datasources/external/mastodon/options.js.map +1 -1
- package/dist/shared/datasources/external/mastodon/status/fetcher.js +31 -1
- package/dist/shared/datasources/external/mastodon/status/fetcher.js.map +1 -1
- package/dist/shared/datasources/external/mastodon/status/sample.array.js +61 -1
- package/dist/shared/datasources/external/mastodon/status/sample.array.js.map +1 -1
- package/dist/shared/datasources/external/mastodon/status/sample.single.js +59 -1
- package/dist/shared/datasources/external/mastodon/status/sample.single.js.map +1 -1
- package/dist/shared/datasources/external/mastodon/status/schema.js +125 -1
- package/dist/shared/datasources/external/mastodon/status/schema.js.map +1 -1
- package/dist/shared/datasources/external/meta/oauth/config.js +17 -1
- package/dist/shared/datasources/external/meta/oauth/config.js.map +1 -1
- package/dist/shared/datasources/external/meta/options.js +10 -1
- package/dist/shared/datasources/external/meta/options.js.map +1 -1
- package/dist/shared/datasources/external/rss/fetcher.js +26 -1
- package/dist/shared/datasources/external/rss/fetcher.js.map +1 -1
- package/dist/shared/datasources/external/rss/options.js +10 -1
- package/dist/shared/datasources/external/rss/options.js.map +1 -1
- package/dist/shared/datasources/external/rss/schema.js +7 -1
- package/dist/shared/datasources/external/threads/media/fetcher.js +47 -1
- package/dist/shared/datasources/external/threads/media/fetcher.js.map +1 -1
- package/dist/shared/datasources/external/threads/media/schema.js +40 -1
- package/dist/shared/datasources/external/threads/media/schema.js.map +1 -1
- package/dist/shared/datasources/external/tiktok/oauth/config.js +18 -1
- package/dist/shared/datasources/external/tiktok/oauth/config.js.map +1 -1
- package/dist/shared/datasources/external/tiktok/video/fetcher.js +34 -1
- package/dist/shared/datasources/external/tiktok/video/fetcher.js.map +1 -1
- package/dist/shared/datasources/external/tiktok/video/options.js +11 -1
- package/dist/shared/datasources/external/tiktok/video/options.js.map +1 -1
- package/dist/shared/datasources/external/tiktok/video/schema.js +30 -1
- package/dist/shared/datasources/external/tiktok/video/schema.js.map +1 -1
- package/dist/shared/datasources/external/youtube/list/fetcher.js +32 -1
- package/dist/shared/datasources/external/youtube/list/fetcher.js.map +1 -1
- package/dist/shared/datasources/external/youtube/list/options.js +14 -1
- package/dist/shared/datasources/external/youtube/list/options.js.map +1 -1
- package/dist/shared/datasources/external/youtube/list/schema.js +7 -1
- package/dist/shared/datasources/external/youtube/oauth/config.js +18 -1
- package/dist/shared/datasources/external/youtube/oauth/config.js.map +1 -1
- package/dist/shared/datasources/internal/blog/schema.js +72 -1
- package/dist/shared/datasources/internal/blog/schema.js.map +1 -1
- package/dist/shared/datasources/internal/changelog/schema.js +51 -1
- package/dist/shared/datasources/internal/changelog/schema.js.map +1 -1
- package/dist/shared/datasources/internal/contact-info/schema.js +25 -1
- package/dist/shared/datasources/internal/contact-info/schema.js.map +1 -1
- package/dist/shared/datasources/internal/cv/schema.js +222 -1
- package/dist/shared/datasources/internal/cv/schema.js.map +1 -1
- package/dist/shared/datasources/internal/faq/schema.js +30 -1
- package/dist/shared/datasources/internal/faq/schema.js.map +1 -1
- package/dist/shared/datasources/internal/job-board/schema.js +224 -1
- package/dist/shared/datasources/internal/job-board/schema.js.map +1 -1
- package/dist/shared/datasources/internal/links/schema.js +7 -1
- package/dist/shared/datasources/internal/recipes/schema.js +45 -1
- package/dist/shared/datasources/internal/recipes/schema.js.map +1 -1
- package/dist/shared/datasources/internal/restaurant/schema.js +226 -1
- package/dist/shared/datasources/internal/restaurant/schema.js.map +1 -1
- package/dist/shared/datasources/samples.js +69 -1
- package/dist/shared/datasources/samples.js.map +1 -1
- package/dist/shared/datasources/schemas.js +34 -1
- package/dist/shared/datasources/schemas.js.map +1 -1
- package/dist/shared/datasources/types.d.ts +1 -1
- package/dist/shared/datasources/types.d.ts.map +1 -1
- package/dist/shared/datasources/types.js +32 -1
- package/dist/shared/datasources/utils.js +11 -1
- package/dist/shared/datasources.js +51 -1
- package/dist/shared/datasources.js.map +1 -1
- package/dist/shared/errors.js +7 -1
- package/dist/shared/images.d.ts +4 -4
- package/dist/shared/images.d.ts.map +1 -1
- package/dist/shared/images.js +44 -1
- package/dist/shared/images.js.map +1 -1
- package/dist/shared/index.js +9 -1
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/layout-constants.js +14 -1
- package/dist/shared/layout-constants.js.map +1 -1
- package/dist/shared/manifest.js +52 -1
- package/dist/shared/manifest.js.map +1 -1
- package/dist/shared/oauth.js +8 -1
- package/dist/shared/page.d.ts +12 -126
- package/dist/shared/page.d.ts.map +1 -1
- package/dist/shared/page.js +58 -1
- package/dist/shared/prompt.js +7 -1
- package/dist/shared/responsive.js +10 -1
- package/dist/shared/responsive.js.map +1 -1
- package/dist/shared/schema-registry.d.ts +5 -0
- package/dist/shared/schema-registry.d.ts.map +1 -0
- package/dist/shared/schema-registry.js +119 -0
- package/dist/shared/schema-registry.js.map +1 -0
- package/dist/shared/site.d.ts +36 -33
- package/dist/shared/site.d.ts.map +1 -1
- package/dist/shared/site.js +127 -1
- package/dist/shared/site.js.map +1 -1
- package/dist/shared/sitemap.d.ts +17 -17
- package/dist/shared/sitemap.d.ts.map +1 -1
- package/dist/shared/sitemap.js +69 -1
- package/dist/shared/social-icons.js +312 -1
- package/dist/shared/social-icons.js.map +1 -1
- package/dist/shared/tests/schema-registry.test.d.ts +2 -0
- package/dist/shared/tests/schema-registry.test.d.ts.map +1 -0
- package/dist/shared/theme.d.ts +1 -1
- package/dist/shared/theme.d.ts.map +1 -1
- package/dist/shared/theme.js +35 -1
- package/dist/shared/themes/color-system.d.ts +0 -1
- package/dist/shared/themes/color-system.d.ts.map +1 -1
- package/dist/shared/themes/color-system.js +103 -1
- package/dist/shared/themes/color-system.js.map +1 -1
- package/dist/shared/utils/canvas-data-uri.js +7 -1
- package/dist/shared/utils/canvas-data-uri.js.map +1 -1
- package/dist/shared/utils/invariant.js +7 -1
- package/dist/shared/utils/json-date.js +7 -1
- package/dist/shared/utils/llm.d.ts +2 -3
- package/dist/shared/utils/llm.d.ts.map +1 -1
- package/dist/shared/utils/llm.js +24 -1
- package/dist/shared/utils/merge.js +7 -1
- package/dist/shared/utils/object-hash.js +13 -1
- package/dist/shared/utils/object-hash.js.map +1 -1
- package/dist/shared/utils/schema-registry.d.ts +5 -0
- package/dist/shared/utils/schema-registry.d.ts.map +1 -0
- package/dist/shared/utils/schema-registry.js +29 -0
- package/dist/shared/utils/schema-registry.js.map +1 -0
- package/dist/shared/utils/schema.d.ts +2 -1
- package/dist/shared/utils/schema.d.ts.map +1 -1
- package/dist/shared/utils/schema.js +31 -1
- package/dist/shared/utils/string-enum.js +7 -1
- package/dist/shared/utils/tests/schema-registry.test.d.ts +2 -0
- package/dist/shared/utils/tests/schema-registry.test.d.ts.map +1 -0
- package/dist/shared/utils/try-catch.js +13 -1
- package/dist/shared/utils/try-catch.js.map +1 -1
- package/dist/shared/utils/typed-ref.js +7 -1
- package/package.json +12 -13
- package/src/shared/ai/schemas.ts +4 -8
- package/src/shared/ai/types.ts +9 -1
- package/src/shared/attributes.ts +27 -25
- package/src/shared/bricks/manifests/all-manifests.ts +15 -0
- package/src/shared/bricks/manifests/footer.manifest.ts +36 -27
- package/src/shared/bricks/manifests/navbar.manifest.ts +1 -3
- package/src/shared/bricks/manifests/table.manifest.ts +443 -0
- package/src/shared/bricks/manifests/tabs.manifest.ts +576 -0
- package/src/shared/bricks/manifests/timeline.manifest.ts +441 -0
- package/src/shared/bricks/props/color-preset.ts +3 -1
- package/src/shared/bricks/props/dynamic.ts +0 -1
- package/src/shared/bricks.ts +54 -45
- package/src/shared/datasources/types.ts +1 -5
- package/src/shared/images.ts +10 -8
- package/src/shared/page.ts +0 -4
- package/src/shared/schema-registry.ts +82 -0
- package/src/shared/sitemap.ts +12 -16
- package/src/shared/tests/schema-registry.test.ts +14 -0
- package/src/shared/theme.ts +1 -4
- package/src/shared/themes/color-system.ts +0 -1
- package/src/shared/utils/llm.ts +13 -12
- package/src/shared/utils/schema-registry.ts +82 -0
- package/src/shared/utils/schema.ts +18 -3
- package/src/shared/utils/tests/schema-registry.test.ts +13 -0
- package/src/shared/utils/tests/schema.test.ts +82 -55
- package/dist/shared/bricks/props/enum.d.ts +0 -13
- package/dist/shared/bricks/props/enum.d.ts.map +0 -1
- package/dist/shared/bricks/props/enum.js +0 -4
- package/dist/shared/chunk-3YVJ2ELD.js +0 -4
- package/dist/shared/chunk-4BTB3MU2.js +0 -4
- package/dist/shared/chunk-4WDWJA3N.js +0 -4
- package/dist/shared/chunk-5O4Z3YQY.js +0 -4
- package/dist/shared/chunk-5YRC3IT3.js +0 -4
- package/dist/shared/chunk-6HLU4UI2.js +0 -4
- package/dist/shared/chunk-6I3ONVU6.js +0 -4
- package/dist/shared/chunk-7A2JNQX3.js +0 -4
- package/dist/shared/chunk-7A2JNQX3.js.map +0 -1
- package/dist/shared/chunk-A3GF4PYW.js +0 -4
- package/dist/shared/chunk-A3K4NUVP.js +0 -4
- package/dist/shared/chunk-A3K4NUVP.js.map +0 -1
- package/dist/shared/chunk-AFVJZPLS.js +0 -4
- package/dist/shared/chunk-AFVJZPLS.js.map +0 -1
- package/dist/shared/chunk-AI4GHU7R.js +0 -4
- package/dist/shared/chunk-AI4GHU7R.js.map +0 -1
- package/dist/shared/chunk-B3EATRFX.js +0 -4
- package/dist/shared/chunk-CCI4C3TM.js +0 -4
- package/dist/shared/chunk-CFF6Q7O7.js +0 -7
- package/dist/shared/chunk-CZRCW5EN.js +0 -4
- package/dist/shared/chunk-DCH4ZKWT.js +0 -4
- package/dist/shared/chunk-DHI3IBOD.js +0 -4
- package/dist/shared/chunk-DQ7PRWTG.js +0 -4
- package/dist/shared/chunk-E6XEI7IK.js +0 -4
- package/dist/shared/chunk-FLOMNC6J.js +0 -4
- package/dist/shared/chunk-G5CJU6RD.js +0 -7
- package/dist/shared/chunk-GACHLACT.js +0 -4
- package/dist/shared/chunk-GLS7HPIZ.js +0 -4
- package/dist/shared/chunk-GOMXZC4B.js +0 -35
- package/dist/shared/chunk-GOMXZC4B.js.map +0 -1
- package/dist/shared/chunk-GPEMPZXK.js +0 -4
- package/dist/shared/chunk-HAGKVQOW.js +0 -4
- package/dist/shared/chunk-I3VL6SRH.js +0 -9
- package/dist/shared/chunk-IKC3FK7L.js +0 -4
- package/dist/shared/chunk-IKHZD2JH.js +0 -4
- package/dist/shared/chunk-IUXCWWGO.js +0 -4
- package/dist/shared/chunk-JMN3HTZU.js +0 -4
- package/dist/shared/chunk-KBHDY425.js +0 -4
- package/dist/shared/chunk-KFM6KXSE.js +0 -4
- package/dist/shared/chunk-KLD3P5XH.js +0 -4
- package/dist/shared/chunk-KO5FPOWZ.js +0 -4
- package/dist/shared/chunk-KSEURRVZ.js +0 -4
- package/dist/shared/chunk-KYY3PHP7.js +0 -4
- package/dist/shared/chunk-NJGXC7D6.js +0 -4
- package/dist/shared/chunk-NM5MMPCF.js +0 -4
- package/dist/shared/chunk-OGBMYMZD.js +0 -4
- package/dist/shared/chunk-OGBMYMZD.js.map +0 -1
- package/dist/shared/chunk-OHNYCXPX.js +0 -4
- package/dist/shared/chunk-OIY3EPHO.js +0 -4
- package/dist/shared/chunk-PIG623TZ.js +0 -4
- package/dist/shared/chunk-PIG623TZ.js.map +0 -1
- package/dist/shared/chunk-PLSV746R.js +0 -4
- package/dist/shared/chunk-PSCN3VVA.js +0 -4
- package/dist/shared/chunk-PSCN3VVA.js.map +0 -1
- package/dist/shared/chunk-PSTFJ5IJ.js +0 -4
- package/dist/shared/chunk-PXI7AHWS.js +0 -4
- package/dist/shared/chunk-Q4H4QEMB.js +0 -4
- package/dist/shared/chunk-QGYZ7CG5.js +0 -4
- package/dist/shared/chunk-QGYZ7CG5.js.map +0 -1
- package/dist/shared/chunk-QWGUMKZC.js +0 -4
- package/dist/shared/chunk-QX6OGRRT.js +0 -5
- package/dist/shared/chunk-R6ATC4TC.js +0 -4
- package/dist/shared/chunk-RDZK73KV.js +0 -4
- package/dist/shared/chunk-RJYZ5FAR.js +0 -4
- package/dist/shared/chunk-SQ5T4AT5.js +0 -6
- package/dist/shared/chunk-SWLUQVK7.js +0 -4
- package/dist/shared/chunk-SXHDQ64Z.js +0 -5
- package/dist/shared/chunk-SY6DZLTC.js +0 -4
- package/dist/shared/chunk-SY6DZLTC.js.map +0 -1
- package/dist/shared/chunk-VEDQV5XO.js +0 -4
- package/dist/shared/chunk-W33JMRRN.js +0 -4
- package/dist/shared/chunk-WBZW5LVH.js +0 -4
- package/dist/shared/chunk-WHTPGWUV.js +0 -4
- package/dist/shared/chunk-WYVJE6J5.js +0 -4
- package/dist/shared/chunk-ZA3GAB4H.js +0 -9
- package/dist/shared/chunk-ZFCUSWMT.js +0 -4
- package/dist/shared/chunk-ZQPXQCY2.js +0 -4
- package/dist/shared/chunk-ZTZJHY4E.js +0 -4
- package/src/shared/bricks/props/enum.ts +0 -38
- /package/dist/shared/bricks/{props/enum.js.map → manifests/table.manifest.js.map} +0 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
defineProps
|
|
5
|
+
} from "./chunk-BHC2A43S.js";
|
|
6
|
+
import {
|
|
7
|
+
defineBrickManifest
|
|
8
|
+
} from "./chunk-TB3X4LRQ.js";
|
|
9
|
+
import {
|
|
10
|
+
fontSizeRef
|
|
11
|
+
} from "./chunk-F22LDHEO.js";
|
|
12
|
+
import {
|
|
13
|
+
string,
|
|
14
|
+
urlOrPageIdRef
|
|
15
|
+
} from "./chunk-UQF52PWK.js";
|
|
16
|
+
import {
|
|
17
|
+
borderRef,
|
|
18
|
+
roundingRef
|
|
19
|
+
} from "./chunk-NTLAKMMQ.js";
|
|
20
|
+
import {
|
|
21
|
+
colorPresetRef
|
|
22
|
+
} from "./chunk-TFGGYU6Y.js";
|
|
23
|
+
|
|
24
|
+
// src/shared/bricks/manifests/button.manifest.ts
|
|
25
|
+
import { Type } from "@sinclair/typebox";
|
|
26
|
+
import { RxButton } from "react-icons/rx";
|
|
27
|
+
var manifest = defineBrickManifest({
|
|
28
|
+
type: "button",
|
|
29
|
+
name: "Button",
|
|
30
|
+
category: "basic",
|
|
31
|
+
description: "A button",
|
|
32
|
+
aiInstructions: "A clickable button that can link to a URL or a page within the site. It can be styled with different colors, font sizes, and border radii. Don't use it in forms since forms have their own submit button.",
|
|
33
|
+
resizable: "horizontal",
|
|
34
|
+
icon: RxButton,
|
|
35
|
+
minWidth: {
|
|
36
|
+
desktop: 120,
|
|
37
|
+
mobile: 120
|
|
38
|
+
},
|
|
39
|
+
defaultWidth: {
|
|
40
|
+
mobile: "100%"
|
|
41
|
+
},
|
|
42
|
+
props: defineProps(
|
|
43
|
+
{
|
|
44
|
+
colorPreset: Type.Optional(
|
|
45
|
+
colorPresetRef({
|
|
46
|
+
default: { color: "primary-500" },
|
|
47
|
+
title: "Color",
|
|
48
|
+
"ui:default-gradient-direction": "bg-gradient-to-b"
|
|
49
|
+
})
|
|
50
|
+
),
|
|
51
|
+
label: string("Label", { default: "My button", metadata: { category: "content" } }),
|
|
52
|
+
fontSize: Type.Optional(
|
|
53
|
+
fontSizeRef({
|
|
54
|
+
title: "Font size",
|
|
55
|
+
description: "The font size of the button text.",
|
|
56
|
+
default: "text-base",
|
|
57
|
+
"ui:responsive": "desktop",
|
|
58
|
+
"ui:no-extra-large-sizes": true
|
|
59
|
+
})
|
|
60
|
+
),
|
|
61
|
+
rounding: Type.Optional(
|
|
62
|
+
roundingRef({
|
|
63
|
+
default: "rounded-md"
|
|
64
|
+
})
|
|
65
|
+
),
|
|
66
|
+
border: Type.Optional(borderRef({ default: { width: "border-0" }, "ui:responsive": "desktop" })),
|
|
67
|
+
link: urlOrPageIdRef({
|
|
68
|
+
title: "Link",
|
|
69
|
+
"ui:placeholder": "https://example.com",
|
|
70
|
+
metadata: { category: "content" }
|
|
71
|
+
})
|
|
72
|
+
},
|
|
73
|
+
{ noGrow: true }
|
|
74
|
+
)
|
|
75
|
+
});
|
|
76
|
+
var examples = [
|
|
77
|
+
{
|
|
78
|
+
description: "Primary button, full width, linking to an external URL",
|
|
79
|
+
type: "button",
|
|
80
|
+
props: {
|
|
81
|
+
label: "Click me",
|
|
82
|
+
link: "https://example.com",
|
|
83
|
+
colorPreset: { color: "primary-500" }
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
description: "Secondary button, block width, linking to a page id",
|
|
88
|
+
type: "button",
|
|
89
|
+
props: {
|
|
90
|
+
label: "Go to page",
|
|
91
|
+
link: "page-id-123",
|
|
92
|
+
colorPreset: { color: "secondary-500" }
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
description: "Neutral colored button with large text and rounded corners and external link",
|
|
97
|
+
type: "button",
|
|
98
|
+
props: {
|
|
99
|
+
label: "Submit",
|
|
100
|
+
fontSize: "text-lg",
|
|
101
|
+
rounding: "rounded-full",
|
|
102
|
+
link: "https://example.com",
|
|
103
|
+
colorPreset: { color: "neutral-500" }
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
description: "Dynamic label from a page query alias named 'employee'",
|
|
108
|
+
type: "button",
|
|
109
|
+
props: {
|
|
110
|
+
label: "Go to profile of {{employee.name}}",
|
|
111
|
+
link: "/employees/{{employee.$slug}}",
|
|
112
|
+
fontSize: "text-lg",
|
|
113
|
+
rounding: "rounded-full",
|
|
114
|
+
colorPreset: { color: "neutral-500" }
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
description: "Accent colored call-to-action button with medium text and subtle border",
|
|
119
|
+
type: "button",
|
|
120
|
+
props: {
|
|
121
|
+
label: "Get Started",
|
|
122
|
+
link: "/signup",
|
|
123
|
+
fontSize: "text-base",
|
|
124
|
+
rounding: "rounded-lg",
|
|
125
|
+
colorPreset: { color: "accent-600" },
|
|
126
|
+
border: { width: "border", color: "border-accent-700" }
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
description: "Small text button with sharp corners for minimal design",
|
|
131
|
+
type: "button",
|
|
132
|
+
props: {
|
|
133
|
+
label: "Learn More",
|
|
134
|
+
link: "/about",
|
|
135
|
+
fontSize: "text-sm",
|
|
136
|
+
rounding: "rounded-none",
|
|
137
|
+
colorPreset: { color: "primary-400" }
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
description: "Large download button with thick border and rounded corners",
|
|
142
|
+
type: "button",
|
|
143
|
+
props: {
|
|
144
|
+
label: "Download Now",
|
|
145
|
+
link: "https://download.example.com/file.zip",
|
|
146
|
+
fontSize: "text-xl",
|
|
147
|
+
rounding: "rounded-xl",
|
|
148
|
+
colorPreset: { color: "secondary-600" },
|
|
149
|
+
border: { width: "border-2", color: "border-secondary-800" }
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
description: "Contact button with neutral colors and medium border radius",
|
|
154
|
+
type: "button",
|
|
155
|
+
props: {
|
|
156
|
+
label: "Contact Us",
|
|
157
|
+
link: "/contact",
|
|
158
|
+
fontSize: "text-base",
|
|
159
|
+
rounding: "rounded-md",
|
|
160
|
+
colorPreset: { color: "neutral-600" },
|
|
161
|
+
border: { width: "border", color: "border-neutral-400" }
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
description: "Newsletter signup button with gradient background and full rounding",
|
|
166
|
+
type: "button",
|
|
167
|
+
props: {
|
|
168
|
+
label: "Subscribe to Newsletter",
|
|
169
|
+
link: "/newsletter",
|
|
170
|
+
fontSize: "text-lg",
|
|
171
|
+
rounding: "rounded-full",
|
|
172
|
+
colorPreset: {
|
|
173
|
+
color: "primary-500",
|
|
174
|
+
gradientDirection: "bg-gradient-to-r"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
description: "Shop now button with accent colors and extra large text",
|
|
180
|
+
type: "button",
|
|
181
|
+
props: {
|
|
182
|
+
label: "Shop Now",
|
|
183
|
+
link: "/shop",
|
|
184
|
+
fontSize: "text-xl",
|
|
185
|
+
rounding: "rounded-lg",
|
|
186
|
+
colorPreset: { color: "accent-500" }
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
description: "Dynamic product button using product query data",
|
|
191
|
+
type: "button",
|
|
192
|
+
props: {
|
|
193
|
+
label: "Buy {{product.name}} - ${{product.price}}",
|
|
194
|
+
link: "/products/{{product.id}}/purchase",
|
|
195
|
+
fontSize: "text-base",
|
|
196
|
+
rounding: "rounded-md",
|
|
197
|
+
colorPreset: { color: "primary-600" },
|
|
198
|
+
border: { width: "border", color: "border-primary-800" }
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
description: "Event registration button with secondary gradient and medium text",
|
|
203
|
+
type: "button",
|
|
204
|
+
props: {
|
|
205
|
+
label: "Register for Event",
|
|
206
|
+
link: "/events/register",
|
|
207
|
+
fontSize: "text-base",
|
|
208
|
+
rounding: "rounded-lg",
|
|
209
|
+
colorPreset: {
|
|
210
|
+
color: "secondary-500",
|
|
211
|
+
gradientDirection: "bg-gradient-to-br"
|
|
212
|
+
},
|
|
213
|
+
border: { width: "border", color: "border-secondary-300" }
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
];
|
|
217
|
+
|
|
218
|
+
export {
|
|
219
|
+
manifest,
|
|
220
|
+
examples
|
|
221
|
+
};
|
|
222
|
+
//# sourceMappingURL=chunk-X6N463D4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/shared/bricks/manifests/button.manifest.ts"],"sourcesContent":["import { Type } from \"@sinclair/typebox\";\nimport { RxButton } from \"react-icons/rx\";\nimport { defineBrickManifest } from \"~/shared/brick-manifest\";\nimport { defineProps } from \"../props/helpers\";\nimport { string, urlOrPageIdRef } from \"../props/string\";\nimport type { BrickProps } from \"../props/types\";\nimport { borderRef, roundingRef } from \"../props/border\";\nimport { fontSizeRef } from \"../props/text\";\nimport { colorPresetRef } from \"../props/color-preset\";\n\nexport const manifest = defineBrickManifest({\n type: \"button\",\n name: \"Button\",\n category: \"basic\",\n description: \"A button\",\n aiInstructions:\n \"A clickable button that can link to a URL or a page within the site. It can be styled with different colors, font sizes, and border radii. Don't use it in forms since forms have their own submit button.\",\n resizable: \"horizontal\",\n icon: RxButton,\n minWidth: {\n desktop: 120,\n mobile: 120,\n },\n defaultWidth: {\n mobile: \"100%\",\n },\n props: defineProps(\n {\n colorPreset: Type.Optional(\n colorPresetRef({\n default: { color: \"primary-500\" },\n title: \"Color\",\n \"ui:default-gradient-direction\": \"bg-gradient-to-b\",\n }),\n ),\n label: string(\"Label\", { default: \"My button\", metadata: { category: \"content\" } }),\n fontSize: Type.Optional(\n fontSizeRef({\n title: \"Font size\",\n description: \"The font size of the button text.\",\n default: \"text-base\",\n \"ui:responsive\": \"desktop\",\n \"ui:no-extra-large-sizes\": true,\n }),\n ),\n rounding: Type.Optional(\n roundingRef({\n default: \"rounded-md\",\n }),\n ),\n border: Type.Optional(borderRef({ default: { width: \"border-0\" }, \"ui:responsive\": \"desktop\" })),\n link: urlOrPageIdRef({\n title: \"Link\",\n \"ui:placeholder\": \"https://example.com\",\n metadata: { category: \"content\" },\n }),\n },\n { noGrow: true },\n ),\n});\n\nexport type Manifest = typeof manifest;\n\nexport const examples: {\n description: string;\n type: string;\n props: BrickProps<Manifest>[\"brick\"][\"props\"];\n}[] = [\n {\n description: \"Primary button, full width, linking to an external URL\",\n type: \"button\",\n props: {\n label: \"Click me\",\n link: \"https://example.com\",\n colorPreset: { color: \"primary-500\" },\n },\n },\n {\n description: \"Secondary button, block width, linking to a page id\",\n type: \"button\",\n props: {\n label: \"Go to page\",\n link: \"page-id-123\",\n colorPreset: { color: \"secondary-500\" },\n },\n },\n {\n description: \"Neutral colored button with large text and rounded corners and external link\",\n type: \"button\",\n props: {\n label: \"Submit\",\n fontSize: \"text-lg\",\n rounding: \"rounded-full\",\n link: \"https://example.com\",\n colorPreset: { color: \"neutral-500\" },\n },\n },\n {\n description: \"Dynamic label from a page query alias named 'employee'\",\n type: \"button\",\n props: {\n label: \"Go to profile of {{employee.name}}\",\n link: \"/employees/{{employee.$slug}}\",\n fontSize: \"text-lg\",\n rounding: \"rounded-full\",\n colorPreset: { color: \"neutral-500\" },\n },\n },\n {\n description: \"Accent colored call-to-action button with medium text and subtle border\",\n type: \"button\",\n props: {\n label: \"Get Started\",\n link: \"/signup\",\n fontSize: \"text-base\",\n rounding: \"rounded-lg\",\n colorPreset: { color: \"accent-600\" },\n border: { width: \"border\", color: \"border-accent-700\" },\n },\n },\n {\n description: \"Small text button with sharp corners for minimal design\",\n type: \"button\",\n props: {\n label: \"Learn More\",\n link: \"/about\",\n fontSize: \"text-sm\",\n rounding: \"rounded-none\",\n colorPreset: { color: \"primary-400\" },\n },\n },\n {\n description: \"Large download button with thick border and rounded corners\",\n type: \"button\",\n props: {\n label: \"Download Now\",\n link: \"https://download.example.com/file.zip\",\n fontSize: \"text-xl\",\n rounding: \"rounded-xl\",\n colorPreset: { color: \"secondary-600\" },\n border: { width: \"border-2\", color: \"border-secondary-800\" },\n },\n },\n {\n description: \"Contact button with neutral colors and medium border radius\",\n type: \"button\",\n props: {\n label: \"Contact Us\",\n link: \"/contact\",\n fontSize: \"text-base\",\n rounding: \"rounded-md\",\n colorPreset: { color: \"neutral-600\" },\n border: { width: \"border\", color: \"border-neutral-400\" },\n },\n },\n {\n description: \"Newsletter signup button with gradient background and full rounding\",\n type: \"button\",\n props: {\n label: \"Subscribe to Newsletter\",\n link: \"/newsletter\",\n fontSize: \"text-lg\",\n rounding: \"rounded-full\",\n colorPreset: {\n color: \"primary-500\",\n gradientDirection: \"bg-gradient-to-r\",\n },\n },\n },\n {\n description: \"Shop now button with accent colors and extra large text\",\n type: \"button\",\n props: {\n label: \"Shop Now\",\n link: \"/shop\",\n fontSize: \"text-xl\",\n rounding: \"rounded-lg\",\n colorPreset: { color: \"accent-500\" },\n },\n },\n {\n description: \"Dynamic product button using product query data\",\n type: \"button\",\n props: {\n label: \"Buy {{product.name}} - ${{product.price}}\",\n link: \"/products/{{product.id}}/purchase\",\n fontSize: \"text-base\",\n rounding: \"rounded-md\",\n colorPreset: { color: \"primary-600\" },\n border: { width: \"border\", color: \"border-primary-800\" },\n },\n },\n {\n description: \"Event registration button with secondary gradient and medium text\",\n type: \"button\",\n props: {\n label: \"Register for Event\",\n link: \"/events/register\",\n fontSize: \"text-base\",\n rounding: \"rounded-lg\",\n colorPreset: {\n color: \"secondary-500\",\n gradientDirection: \"bg-gradient-to-br\",\n },\n border: { width: \"border\", color: \"border-secondary-300\" },\n },\n },\n];\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/shared/bricks/manifests/button.manifest.ts"],"sourcesContent":["import { Type } from \"@sinclair/typebox\";\nimport { RxButton } from \"react-icons/rx\";\nimport { defineBrickManifest } from \"~/shared/brick-manifest\";\nimport { defineProps } from \"../props/helpers\";\nimport { string, urlOrPageIdRef } from \"../props/string\";\nimport type { BrickProps } from \"../props/types\";\nimport { borderRef, roundingRef } from \"../props/border\";\nimport { fontSizeRef } from \"../props/text\";\nimport { colorPresetRef } from \"../props/color-preset\";\n\nexport const manifest = defineBrickManifest({\n type: \"button\",\n name: \"Button\",\n category: \"basic\",\n description: \"A button\",\n aiInstructions:\n \"A clickable button that can link to a URL or a page within the site. It can be styled with different colors, font sizes, and border radii. Don't use it in forms since forms have their own submit button.\",\n resizable: \"horizontal\",\n icon: RxButton,\n minWidth: {\n desktop: 120,\n mobile: 120,\n },\n defaultWidth: {\n mobile: \"100%\",\n },\n props: defineProps(\n {\n colorPreset: Type.Optional(\n colorPresetRef({\n default: { color: \"primary-500\" },\n title: \"Color\",\n \"ui:default-gradient-direction\": \"bg-gradient-to-b\",\n }),\n ),\n label: string(\"Label\", { default: \"My button\", metadata: { category: \"content\" } }),\n fontSize: Type.Optional(\n fontSizeRef({\n title: \"Font size\",\n description: \"The font size of the button text.\",\n default: \"text-base\",\n \"ui:responsive\": \"desktop\",\n \"ui:no-extra-large-sizes\": true,\n }),\n ),\n rounding: Type.Optional(\n roundingRef({\n default: \"rounded-md\",\n }),\n ),\n border: Type.Optional(borderRef({ default: { width: \"border-0\" }, \"ui:responsive\": \"desktop\" })),\n link: urlOrPageIdRef({\n title: \"Link\",\n \"ui:placeholder\": \"https://example.com\",\n metadata: { category: \"content\" },\n }),\n },\n { noGrow: true },\n ),\n});\n\nexport type Manifest = typeof manifest;\n\nexport const examples: {\n description: string;\n type: string;\n props: BrickProps<Manifest>[\"brick\"][\"props\"];\n}[] = [\n {\n description: \"Primary button, full width, linking to an external URL\",\n type: \"button\",\n props: {\n label: \"Click me\",\n link: \"https://example.com\",\n colorPreset: { color: \"primary-500\" },\n },\n },\n {\n description: \"Secondary button, block width, linking to a page id\",\n type: \"button\",\n props: {\n label: \"Go to page\",\n link: \"page-id-123\",\n colorPreset: { color: \"secondary-500\" },\n },\n },\n {\n description: \"Neutral colored button with large text and rounded corners and external link\",\n type: \"button\",\n props: {\n label: \"Submit\",\n fontSize: \"text-lg\",\n rounding: \"rounded-full\",\n link: \"https://example.com\",\n colorPreset: { color: \"neutral-500\" },\n },\n },\n {\n description: \"Dynamic label from a page query alias named 'employee'\",\n type: \"button\",\n props: {\n label: \"Go to profile of {{employee.name}}\",\n link: \"/employees/{{employee.$slug}}\",\n fontSize: \"text-lg\",\n rounding: \"rounded-full\",\n colorPreset: { color: \"neutral-500\" },\n },\n },\n {\n description: \"Accent colored call-to-action button with medium text and subtle border\",\n type: \"button\",\n props: {\n label: \"Get Started\",\n link: \"/signup\",\n fontSize: \"text-base\",\n rounding: \"rounded-lg\",\n colorPreset: { color: \"accent-600\" },\n border: { width: \"border\", color: \"border-accent-700\" },\n },\n },\n {\n description: \"Small text button with sharp corners for minimal design\",\n type: \"button\",\n props: {\n label: \"Learn More\",\n link: \"/about\",\n fontSize: \"text-sm\",\n rounding: \"rounded-none\",\n colorPreset: { color: \"primary-400\" },\n },\n },\n {\n description: \"Large download button with thick border and rounded corners\",\n type: \"button\",\n props: {\n label: \"Download Now\",\n link: \"https://download.example.com/file.zip\",\n fontSize: \"text-xl\",\n rounding: \"rounded-xl\",\n colorPreset: { color: \"secondary-600\" },\n border: { width: \"border-2\", color: \"border-secondary-800\" },\n },\n },\n {\n description: \"Contact button with neutral colors and medium border radius\",\n type: \"button\",\n props: {\n label: \"Contact Us\",\n link: \"/contact\",\n fontSize: \"text-base\",\n rounding: \"rounded-md\",\n colorPreset: { color: \"neutral-600\" },\n border: { width: \"border\", color: \"border-neutral-400\" },\n },\n },\n {\n description: \"Newsletter signup button with gradient background and full rounding\",\n type: \"button\",\n props: {\n label: \"Subscribe to Newsletter\",\n link: \"/newsletter\",\n fontSize: \"text-lg\",\n rounding: \"rounded-full\",\n colorPreset: {\n color: \"primary-500\",\n gradientDirection: \"bg-gradient-to-r\",\n },\n },\n },\n {\n description: \"Shop now button with accent colors and extra large text\",\n type: \"button\",\n props: {\n label: \"Shop Now\",\n link: \"/shop\",\n fontSize: \"text-xl\",\n rounding: \"rounded-lg\",\n colorPreset: { color: \"accent-500\" },\n },\n },\n {\n description: \"Dynamic product button using product query data\",\n type: \"button\",\n props: {\n label: \"Buy {{product.name}} - ${{product.price}}\",\n link: \"/products/{{product.id}}/purchase\",\n fontSize: \"text-base\",\n rounding: \"rounded-md\",\n colorPreset: { color: \"primary-600\" },\n border: { width: \"border\", color: \"border-primary-800\" },\n },\n },\n {\n description: \"Event registration button with secondary gradient and medium text\",\n type: \"button\",\n props: {\n label: \"Register for Event\",\n link: \"/events/register\",\n fontSize: \"text-base\",\n rounding: \"rounded-lg\",\n colorPreset: {\n color: \"secondary-500\",\n gradientDirection: \"bg-gradient-to-br\",\n },\n border: { width: \"border\", color: \"border-secondary-300\" },\n },\n },\n];\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
defineProps
|
|
5
|
+
} from "./chunk-BHC2A43S.js";
|
|
6
|
+
import {
|
|
7
|
+
defineBrickManifest
|
|
8
|
+
} from "./chunk-TB3X4LRQ.js";
|
|
9
|
+
import {
|
|
10
|
+
loopRef
|
|
11
|
+
} from "./chunk-BW6EFRSF.js";
|
|
12
|
+
import {
|
|
13
|
+
iconRef,
|
|
14
|
+
urlOrPageIdRef
|
|
15
|
+
} from "./chunk-UQF52PWK.js";
|
|
16
|
+
import {
|
|
17
|
+
colorRef
|
|
18
|
+
} from "./chunk-SE6O65HC.js";
|
|
19
|
+
import {
|
|
20
|
+
cssLengthRef
|
|
21
|
+
} from "./chunk-BPBKHEQ5.js";
|
|
22
|
+
|
|
23
|
+
// src/shared/bricks/manifests/icon.manifest.ts
|
|
24
|
+
import { PiConfetti } from "react-icons/pi";
|
|
25
|
+
import { Type } from "@sinclair/typebox";
|
|
26
|
+
var manifest = defineBrickManifest({
|
|
27
|
+
type: "icon",
|
|
28
|
+
name: "Icon",
|
|
29
|
+
category: "basic",
|
|
30
|
+
description: "An icon.",
|
|
31
|
+
aiInstructions: "Uses iconify references",
|
|
32
|
+
resizable: false,
|
|
33
|
+
staticClasses: "!grow-0",
|
|
34
|
+
icon: PiConfetti,
|
|
35
|
+
props: defineProps(
|
|
36
|
+
{
|
|
37
|
+
icon: iconRef({
|
|
38
|
+
default: "mdi:heart"
|
|
39
|
+
}),
|
|
40
|
+
size: Type.Optional(
|
|
41
|
+
cssLengthRef({
|
|
42
|
+
title: "Size",
|
|
43
|
+
description: "The size of the icon. Can be a CSS length value (e.g. '2em', '24px')",
|
|
44
|
+
default: "1em",
|
|
45
|
+
"ui:css-units": ["em", "rem", "px"],
|
|
46
|
+
"ai:instructions": "Use 'em', 'rem', or 'px' for units. Example: '2em', '24px'"
|
|
47
|
+
})
|
|
48
|
+
),
|
|
49
|
+
color: Type.Optional(
|
|
50
|
+
colorRef({
|
|
51
|
+
title: "Color",
|
|
52
|
+
default: "currentColor",
|
|
53
|
+
"ui:hide-color-label": true
|
|
54
|
+
})
|
|
55
|
+
),
|
|
56
|
+
link: Type.Optional(urlOrPageIdRef({ title: "Link" })),
|
|
57
|
+
loop: Type.Optional(loopRef())
|
|
58
|
+
},
|
|
59
|
+
{ noGrow: true }
|
|
60
|
+
)
|
|
61
|
+
});
|
|
62
|
+
var examples = [
|
|
63
|
+
{
|
|
64
|
+
description: "Large heart icon with inherited color and size",
|
|
65
|
+
type: "icon",
|
|
66
|
+
props: {
|
|
67
|
+
icon: "mdi:heart"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
description: "Shopping cart icon",
|
|
72
|
+
type: "icon",
|
|
73
|
+
props: {
|
|
74
|
+
icon: "mdi:cart",
|
|
75
|
+
size: "1.2em"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
description: "Social media icon with blue color and link",
|
|
80
|
+
type: "icon",
|
|
81
|
+
props: {
|
|
82
|
+
icon: "mdi:facebook",
|
|
83
|
+
size: "1.5em",
|
|
84
|
+
color: "#1877f2",
|
|
85
|
+
link: "https://facebook.com/yourpage"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
description: "Warning icon with orange color for alerts",
|
|
90
|
+
type: "icon",
|
|
91
|
+
props: {
|
|
92
|
+
icon: "mdi:alert-triangle",
|
|
93
|
+
size: "1.8em",
|
|
94
|
+
color: "#f59e0b"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
description: "Email contact icon with link",
|
|
99
|
+
type: "icon",
|
|
100
|
+
props: {
|
|
101
|
+
icon: "mdi:email",
|
|
102
|
+
size: "1.3em",
|
|
103
|
+
color: "#4f46e5",
|
|
104
|
+
link: "mailto:contact@example.com"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
description: "Phone icon with green color",
|
|
109
|
+
type: "icon",
|
|
110
|
+
props: {
|
|
111
|
+
icon: "mdi:phone",
|
|
112
|
+
size: "1.4em",
|
|
113
|
+
color: "#10b981"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
description: "Location pin icon with red color",
|
|
118
|
+
type: "icon",
|
|
119
|
+
props: {
|
|
120
|
+
icon: "mdi:map-marker",
|
|
121
|
+
size: "2.2em",
|
|
122
|
+
color: "#ef4444"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
description: "Twitter/X icon with custom color and link",
|
|
127
|
+
type: "icon",
|
|
128
|
+
props: {
|
|
129
|
+
icon: "mdi:twitter",
|
|
130
|
+
size: "1.6em",
|
|
131
|
+
color: "#000000",
|
|
132
|
+
link: "https://x.com/yourhandle"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
description: "Star rating icon with gold color",
|
|
137
|
+
type: "icon",
|
|
138
|
+
props: {
|
|
139
|
+
icon: "mdi:star",
|
|
140
|
+
size: "1.2em",
|
|
141
|
+
color: "#fbbf24"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
description: "Download icon with link and purple color",
|
|
146
|
+
type: "icon",
|
|
147
|
+
props: {
|
|
148
|
+
icon: "mdi:download",
|
|
149
|
+
size: "1.5em",
|
|
150
|
+
color: "#8b5cf6",
|
|
151
|
+
link: "/files/brochure.pdf"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
description: "Menu hamburger icon for navigation",
|
|
156
|
+
type: "icon",
|
|
157
|
+
props: {
|
|
158
|
+
icon: "mdi:menu",
|
|
159
|
+
size: "1.8em",
|
|
160
|
+
color: "#374151"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
description: "Search icon with dark color",
|
|
165
|
+
type: "icon",
|
|
166
|
+
props: {
|
|
167
|
+
icon: "mdi:magnify",
|
|
168
|
+
size: "1.1em",
|
|
169
|
+
color: "#1f2937"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
];
|
|
173
|
+
|
|
174
|
+
export {
|
|
175
|
+
manifest,
|
|
176
|
+
examples
|
|
177
|
+
};
|
|
178
|
+
//# sourceMappingURL=chunk-X75YV73Q.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/shared/bricks/manifests/icon.manifest.ts"],"sourcesContent":["import { defineBrickManifest } from \"~/shared/brick-manifest\";\nimport { defineProps } from \"../props/helpers\";\nimport { PiConfetti } from \"react-icons/pi\";\nimport { iconRef, urlOrPageIdRef } from \"../props/string\";\nimport type { BrickProps } from \"../props/types\";\nimport { Type } from \"@sinclair/typebox\";\nimport { cssLengthRef } from \"../props/css-length\";\nimport { colorRef } from \"../props/color\";\nimport { loopRef } from \"../props/dynamic\";\n\nexport const manifest = defineBrickManifest({\n type: \"icon\",\n name: \"Icon\",\n category: \"basic\",\n description: \"An icon.\",\n aiInstructions: \"Uses iconify references\",\n resizable: false,\n staticClasses: \"!grow-0\",\n icon: PiConfetti,\n props: defineProps(\n {\n icon: iconRef({\n default: \"mdi:heart\",\n }),\n size: Type.Optional(\n cssLengthRef({\n title: \"Size\",\n description: \"The size of the icon. Can be a CSS length value (e.g. '2em', '24px')\",\n default: \"1em\",\n \"ui:css-units\": [\"em\", \"rem\", \"px\"],\n \"ai:instructions\": \"Use 'em', 'rem', or 'px' for units. Example: '2em', '24px'\",\n }),\n ),\n color: Type.Optional(\n colorRef({\n title: \"Color\",\n default: \"currentColor\",\n \"ui:hide-color-label\": true,\n }),\n ),\n link: Type.Optional(urlOrPageIdRef({ title: \"Link\" })),\n loop: Type.Optional(loopRef()),\n },\n { noGrow: true },\n ),\n});\n\nexport type Manifest = typeof manifest;\n\nexport const examples: {\n description: string;\n type: string;\n props: BrickProps<Manifest>[\"brick\"][\"props\"];\n}[] = [\n {\n description: \"Large heart icon with inherited color and size\",\n type: \"icon\",\n props: {\n icon: \"mdi:heart\",\n },\n },\n {\n description: \"Shopping cart icon\",\n type: \"icon\",\n props: {\n icon: \"mdi:cart\",\n size: \"1.2em\",\n },\n },\n {\n description: \"Social media icon with blue color and link\",\n type: \"icon\",\n props: {\n icon: \"mdi:facebook\",\n size: \"1.5em\",\n color: \"#1877f2\",\n link: \"https://facebook.com/yourpage\",\n },\n },\n {\n description: \"Warning icon with orange color for alerts\",\n type: \"icon\",\n props: {\n icon: \"mdi:alert-triangle\",\n size: \"1.8em\",\n color: \"#f59e0b\",\n },\n },\n {\n description: \"Email contact icon with link\",\n type: \"icon\",\n props: {\n icon: \"mdi:email\",\n size: \"1.3em\",\n color: \"#4f46e5\",\n link: \"mailto:contact@example.com\",\n },\n },\n {\n description: \"Phone icon with green color\",\n type: \"icon\",\n props: {\n icon: \"mdi:phone\",\n size: \"1.4em\",\n color: \"#10b981\",\n },\n },\n {\n description: \"Location pin icon with red color\",\n type: \"icon\",\n props: {\n icon: \"mdi:map-marker\",\n size: \"2.2em\",\n color: \"#ef4444\",\n },\n },\n {\n description: \"Twitter/X icon with custom color and link\",\n type: \"icon\",\n props: {\n icon: \"mdi:twitter\",\n size: \"1.6em\",\n color: \"#000000\",\n link: \"https://x.com/yourhandle\",\n },\n },\n {\n description: \"Star rating icon with gold color\",\n type: \"icon\",\n props: {\n icon: \"mdi:star\",\n size: \"1.2em\",\n color: \"#fbbf24\",\n },\n },\n {\n description: \"Download icon with link and purple color\",\n type: \"icon\",\n props: {\n icon: \"mdi:download\",\n size: \"1.5em\",\n color: \"#8b5cf6\",\n link: \"/files/brochure.pdf\",\n },\n },\n {\n description: \"Menu hamburger icon for navigation\",\n type: \"icon\",\n props: {\n icon: \"mdi:menu\",\n size: \"1.8em\",\n color: \"#374151\",\n },\n },\n {\n description: \"Search icon with dark color\",\n type: \"icon\",\n props: {\n icon: \"mdi:magnify\",\n size: \"1.1em\",\n color: \"#1f2937\",\n },\n },\n];\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/shared/bricks/manifests/icon.manifest.ts"],"sourcesContent":["import { defineBrickManifest } from \"~/shared/brick-manifest\";\nimport { defineProps } from \"../props/helpers\";\nimport { PiConfetti } from \"react-icons/pi\";\nimport { iconRef, urlOrPageIdRef } from \"../props/string\";\nimport type { BrickProps } from \"../props/types\";\nimport { Type } from \"@sinclair/typebox\";\nimport { cssLengthRef } from \"../props/css-length\";\nimport { colorRef } from \"../props/color\";\nimport { loopRef } from \"../props/dynamic\";\n\nexport const manifest = defineBrickManifest({\n type: \"icon\",\n name: \"Icon\",\n category: \"basic\",\n description: \"An icon.\",\n aiInstructions: \"Uses iconify references\",\n resizable: false,\n staticClasses: \"!grow-0\",\n icon: PiConfetti,\n props: defineProps(\n {\n icon: iconRef({\n default: \"mdi:heart\",\n }),\n size: Type.Optional(\n cssLengthRef({\n title: \"Size\",\n description: \"The size of the icon. Can be a CSS length value (e.g. '2em', '24px')\",\n default: \"1em\",\n \"ui:css-units\": [\"em\", \"rem\", \"px\"],\n \"ai:instructions\": \"Use 'em', 'rem', or 'px' for units. Example: '2em', '24px'\",\n }),\n ),\n color: Type.Optional(\n colorRef({\n title: \"Color\",\n default: \"currentColor\",\n \"ui:hide-color-label\": true,\n }),\n ),\n link: Type.Optional(urlOrPageIdRef({ title: \"Link\" })),\n loop: Type.Optional(loopRef()),\n },\n { noGrow: true },\n ),\n});\n\nexport type Manifest = typeof manifest;\n\nexport const examples: {\n description: string;\n type: string;\n props: BrickProps<Manifest>[\"brick\"][\"props\"];\n}[] = [\n {\n description: \"Large heart icon with inherited color and size\",\n type: \"icon\",\n props: {\n icon: \"mdi:heart\",\n },\n },\n {\n description: \"Shopping cart icon\",\n type: \"icon\",\n props: {\n icon: \"mdi:cart\",\n size: \"1.2em\",\n },\n },\n {\n description: \"Social media icon with blue color and link\",\n type: \"icon\",\n props: {\n icon: \"mdi:facebook\",\n size: \"1.5em\",\n color: \"#1877f2\",\n link: \"https://facebook.com/yourpage\",\n },\n },\n {\n description: \"Warning icon with orange color for alerts\",\n type: \"icon\",\n props: {\n icon: \"mdi:alert-triangle\",\n size: \"1.8em\",\n color: \"#f59e0b\",\n },\n },\n {\n description: \"Email contact icon with link\",\n type: \"icon\",\n props: {\n icon: \"mdi:email\",\n size: \"1.3em\",\n color: \"#4f46e5\",\n link: \"mailto:contact@example.com\",\n },\n },\n {\n description: \"Phone icon with green color\",\n type: \"icon\",\n props: {\n icon: \"mdi:phone\",\n size: \"1.4em\",\n color: \"#10b981\",\n },\n },\n {\n description: \"Location pin icon with red color\",\n type: \"icon\",\n props: {\n icon: \"mdi:map-marker\",\n size: \"2.2em\",\n color: \"#ef4444\",\n },\n },\n {\n description: \"Twitter/X icon with custom color and link\",\n type: \"icon\",\n props: {\n icon: \"mdi:twitter\",\n size: \"1.6em\",\n color: \"#000000\",\n link: \"https://x.com/yourhandle\",\n },\n },\n {\n description: \"Star rating icon with gold color\",\n type: \"icon\",\n props: {\n icon: \"mdi:star\",\n size: \"1.2em\",\n color: \"#fbbf24\",\n },\n },\n {\n description: \"Download icon with link and purple color\",\n type: \"icon\",\n props: {\n icon: \"mdi:download\",\n size: \"1.5em\",\n color: \"#8b5cf6\",\n link: \"/files/brochure.pdf\",\n },\n },\n {\n description: \"Menu hamburger icon for navigation\",\n type: \"icon\",\n props: {\n icon: \"mdi:menu\",\n size: \"1.8em\",\n color: \"#374151\",\n },\n },\n {\n description: \"Search icon with dark color\",\n type: \"icon\",\n props: {\n icon: \"mdi:magnify\",\n size: \"1.1em\",\n color: \"#1f2937\",\n },\n },\n];\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
// src/shared/datarecords/external/google/sheets/client.ts
|
|
5
|
+
var GoogleDriveClient = class {
|
|
6
|
+
accessToken;
|
|
7
|
+
constructor(accessToken) {
|
|
8
|
+
this.accessToken = accessToken;
|
|
9
|
+
}
|
|
10
|
+
async callDriveApi(endpoint, method = "GET", body) {
|
|
11
|
+
const isBinaryUpload = body instanceof ArrayBuffer || body instanceof Uint8Array;
|
|
12
|
+
const headers = {
|
|
13
|
+
Authorization: `Bearer ${this.accessToken}`
|
|
14
|
+
};
|
|
15
|
+
if (!isBinaryUpload) {
|
|
16
|
+
headers["Content-Type"] = "application/json";
|
|
17
|
+
} else {
|
|
18
|
+
headers["Content-Type"] = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
19
|
+
}
|
|
20
|
+
const response = await fetch(endpoint, {
|
|
21
|
+
method,
|
|
22
|
+
headers,
|
|
23
|
+
body: isBinaryUpload ? body : body ? JSON.stringify(body) : void 0
|
|
24
|
+
});
|
|
25
|
+
if (endpoint.includes("export") && endpoint.includes("mimeType=text/csv")) {
|
|
26
|
+
const csvText = await response.text();
|
|
27
|
+
return {
|
|
28
|
+
success: response.ok,
|
|
29
|
+
data: csvText,
|
|
30
|
+
status: response.status,
|
|
31
|
+
headers: response.headers
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
if (endpoint.includes("export") && endpoint.includes("mimeType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")) {
|
|
35
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
36
|
+
return {
|
|
37
|
+
success: response.ok,
|
|
38
|
+
data: arrayBuffer,
|
|
39
|
+
status: response.status,
|
|
40
|
+
headers: response.headers
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
if (endpoint.includes("upload/") && response.ok) {
|
|
44
|
+
try {
|
|
45
|
+
const data2 = await response.json();
|
|
46
|
+
return {
|
|
47
|
+
success: response.ok,
|
|
48
|
+
data: data2,
|
|
49
|
+
status: response.status,
|
|
50
|
+
headers: response.headers
|
|
51
|
+
};
|
|
52
|
+
} catch {
|
|
53
|
+
return {
|
|
54
|
+
success: true,
|
|
55
|
+
data: { message: "Upload successful" },
|
|
56
|
+
status: response.status,
|
|
57
|
+
headers: response.headers
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (!response.ok) {
|
|
62
|
+
const contentType = response.headers.get("content-type");
|
|
63
|
+
if (contentType?.includes("text/html")) {
|
|
64
|
+
const errorText = await response.text();
|
|
65
|
+
return {
|
|
66
|
+
success: false,
|
|
67
|
+
data: { error: "HTML error response", details: errorText.substring(0, 200) },
|
|
68
|
+
status: response.status,
|
|
69
|
+
headers: response.headers
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const data = await response.json();
|
|
74
|
+
return {
|
|
75
|
+
success: response.ok,
|
|
76
|
+
data,
|
|
77
|
+
status: response.status,
|
|
78
|
+
headers: response.headers
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
function getClient(accessToken) {
|
|
83
|
+
return new GoogleDriveClient(accessToken);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export {
|
|
87
|
+
getClient
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=chunk-XCWMZVF5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/shared/datarecords/external/google/sheets/client.ts"],"sourcesContent":["interface ApiResponse<T> {\n success: boolean;\n data: T;\n status: number;\n headers: Headers;\n}\n\nclass GoogleDriveClient {\n private accessToken: string;\n\n constructor(accessToken: string) {\n this.accessToken = accessToken;\n }\n\n async callDriveApi<T>(\n endpoint: string,\n method: \"GET\" | \"POST\" | \"PUT\" | \"PATCH\" = \"GET\",\n body?: unknown,\n ): Promise<ApiResponse<T>> {\n // Handle binary data for uploads\n const isBinaryUpload = body instanceof ArrayBuffer || body instanceof Uint8Array;\n const headers: Record<string, string> = {\n Authorization: `Bearer ${this.accessToken}`,\n };\n\n if (!isBinaryUpload) {\n headers[\"Content-Type\"] = \"application/json\";\n } else {\n headers[\"Content-Type\"] = \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n }\n\n const response = await fetch(endpoint, {\n method,\n headers,\n body: isBinaryUpload ? (body as BodyInit) : body ? JSON.stringify(body) : undefined,\n });\n\n // Handle CSV responses\n if (endpoint.includes(\"export\") && endpoint.includes(\"mimeType=text/csv\")) {\n const csvText = await response.text();\n return {\n success: response.ok,\n data: csvText as T,\n status: response.status,\n headers: response.headers,\n };\n }\n\n // Handle binary responses (like XLSX downloads) - keeping for compatibility\n if (\n endpoint.includes(\"export\") &&\n endpoint.includes(\"mimeType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\")\n ) {\n const arrayBuffer = await response.arrayBuffer();\n return {\n success: response.ok,\n data: arrayBuffer as T,\n status: response.status,\n headers: response.headers,\n };\n }\n\n // Handle upload responses which might not be JSON\n if (endpoint.includes(\"upload/\") && response.ok) {\n // For successful uploads, try to parse JSON, but fallback gracefully\n try {\n const data = await response.json();\n return {\n success: response.ok,\n data,\n status: response.status,\n headers: response.headers,\n };\n } catch {\n // If JSON parsing fails but response is ok, return success\n return {\n success: true,\n data: { message: \"Upload successful\" } as T,\n status: response.status,\n headers: response.headers,\n };\n }\n }\n\n // Handle error responses that might be HTML\n if (!response.ok) {\n const contentType = response.headers.get(\"content-type\");\n if (contentType?.includes(\"text/html\")) {\n const errorText = await response.text();\n return {\n success: false,\n data: { error: \"HTML error response\", details: errorText.substring(0, 200) } as T,\n status: response.status,\n headers: response.headers,\n };\n }\n }\n\n const data = await response.json();\n\n return {\n success: response.ok,\n data,\n status: response.status,\n headers: response.headers,\n };\n }\n}\n\nexport default function getClient(accessToken: string): GoogleDriveClient {\n return new GoogleDriveClient(accessToken);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/shared/datarecords/external/google/sheets/client.ts"],"sourcesContent":["interface ApiResponse<T> {\n success: boolean;\n data: T;\n status: number;\n headers: Headers;\n}\n\nclass GoogleDriveClient {\n private accessToken: string;\n\n constructor(accessToken: string) {\n this.accessToken = accessToken;\n }\n\n async callDriveApi<T>(\n endpoint: string,\n method: \"GET\" | \"POST\" | \"PUT\" | \"PATCH\" = \"GET\",\n body?: unknown,\n ): Promise<ApiResponse<T>> {\n // Handle binary data for uploads\n const isBinaryUpload = body instanceof ArrayBuffer || body instanceof Uint8Array;\n const headers: Record<string, string> = {\n Authorization: `Bearer ${this.accessToken}`,\n };\n\n if (!isBinaryUpload) {\n headers[\"Content-Type\"] = \"application/json\";\n } else {\n headers[\"Content-Type\"] = \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n }\n\n const response = await fetch(endpoint, {\n method,\n headers,\n body: isBinaryUpload ? (body as BodyInit) : body ? JSON.stringify(body) : undefined,\n });\n\n // Handle CSV responses\n if (endpoint.includes(\"export\") && endpoint.includes(\"mimeType=text/csv\")) {\n const csvText = await response.text();\n return {\n success: response.ok,\n data: csvText as T,\n status: response.status,\n headers: response.headers,\n };\n }\n\n // Handle binary responses (like XLSX downloads) - keeping for compatibility\n if (\n endpoint.includes(\"export\") &&\n endpoint.includes(\"mimeType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\")\n ) {\n const arrayBuffer = await response.arrayBuffer();\n return {\n success: response.ok,\n data: arrayBuffer as T,\n status: response.status,\n headers: response.headers,\n };\n }\n\n // Handle upload responses which might not be JSON\n if (endpoint.includes(\"upload/\") && response.ok) {\n // For successful uploads, try to parse JSON, but fallback gracefully\n try {\n const data = await response.json();\n return {\n success: response.ok,\n data,\n status: response.status,\n headers: response.headers,\n };\n } catch {\n // If JSON parsing fails but response is ok, return success\n return {\n success: true,\n data: { message: \"Upload successful\" } as T,\n status: response.status,\n headers: response.headers,\n };\n }\n }\n\n // Handle error responses that might be HTML\n if (!response.ok) {\n const contentType = response.headers.get(\"content-type\");\n if (contentType?.includes(\"text/html\")) {\n const errorText = await response.text();\n return {\n success: false,\n data: { error: \"HTML error response\", details: errorText.substring(0, 200) } as T,\n status: response.status,\n headers: response.headers,\n };\n }\n }\n\n const data = await response.json();\n\n return {\n success: response.ok,\n data,\n status: response.status,\n headers: response.headers,\n };\n }\n}\n\nexport default function getClient(accessToken: string): GoogleDriveClient {\n return new GoogleDriveClient(accessToken);\n}\n"],"mappings":";;;;AAOA,IAAM,oBAAN,MAAwB;AAAA,EACd;AAAA,EAER,YAAY,aAAqB;AAC/B,SAAK,cAAc;AAAA,EACrB;AAAA,EAEA,MAAM,aACJ,UACA,SAA2C,OAC3C,MACyB;AAEzB,UAAM,iBAAiB,gBAAgB,eAAe,gBAAgB;AACtE,UAAM,UAAkC;AAAA,MACtC,eAAe,UAAU,KAAK,WAAW;AAAA,IAC3C;AAEA,QAAI,CAAC,gBAAgB;AACnB,cAAQ,cAAc,IAAI;AAAA,IAC5B,OAAO;AACL,cAAQ,cAAc,IAAI;AAAA,IAC5B;AAEA,UAAM,WAAW,MAAM,MAAM,UAAU;AAAA,MACrC;AAAA,MACA;AAAA,MACA,MAAM,iBAAkB,OAAoB,OAAO,KAAK,UAAU,IAAI,IAAI;AAAA,IAC5E,CAAC;AAGD,QAAI,SAAS,SAAS,QAAQ,KAAK,SAAS,SAAS,mBAAmB,GAAG;AACzE,YAAM,UAAU,MAAM,SAAS,KAAK;AACpC,aAAO;AAAA,QACL,SAAS,SAAS;AAAA,QAClB,MAAM;AAAA,QACN,QAAQ,SAAS;AAAA,QACjB,SAAS,SAAS;AAAA,MACpB;AAAA,IACF;AAGA,QACE,SAAS,SAAS,QAAQ,KAC1B,SAAS,SAAS,4EAA4E,GAC9F;AACA,YAAM,cAAc,MAAM,SAAS,YAAY;AAC/C,aAAO;AAAA,QACL,SAAS,SAAS;AAAA,QAClB,MAAM;AAAA,QACN,QAAQ,SAAS;AAAA,QACjB,SAAS,SAAS;AAAA,MACpB;AAAA,IACF;AAGA,QAAI,SAAS,SAAS,SAAS,KAAK,SAAS,IAAI;AAE/C,UAAI;AACF,cAAMA,QAAO,MAAM,SAAS,KAAK;AACjC,eAAO;AAAA,UACL,SAAS,SAAS;AAAA,UAClB,MAAAA;AAAA,UACA,QAAQ,SAAS;AAAA,UACjB,SAAS,SAAS;AAAA,QACpB;AAAA,MACF,QAAQ;AAEN,eAAO;AAAA,UACL,SAAS;AAAA,UACT,MAAM,EAAE,SAAS,oBAAoB;AAAA,UACrC,QAAQ,SAAS;AAAA,UACjB,SAAS,SAAS;AAAA,QACpB;AAAA,MACF;AAAA,IACF;AAGA,QAAI,CAAC,SAAS,IAAI;AAChB,YAAM,cAAc,SAAS,QAAQ,IAAI,cAAc;AACvD,UAAI,aAAa,SAAS,WAAW,GAAG;AACtC,cAAM,YAAY,MAAM,SAAS,KAAK;AACtC,eAAO;AAAA,UACL,SAAS;AAAA,UACT,MAAM,EAAE,OAAO,uBAAuB,SAAS,UAAU,UAAU,GAAG,GAAG,EAAE;AAAA,UAC3E,QAAQ,SAAS;AAAA,UACjB,SAAS,SAAS;AAAA,QACpB;AAAA,MACF;AAAA,IACF;AAEA,UAAM,OAAO,MAAM,SAAS,KAAK;AAEjC,WAAO;AAAA,MACL,SAAS,SAAS;AAAA,MAClB;AAAA,MACA,QAAQ,SAAS;AAAA,MACjB,SAAS,SAAS;AAAA,IACpB;AAAA,EACF;AACF;AAEe,SAAR,UAA2B,aAAwC;AACxE,SAAO,IAAI,kBAAkB,WAAW;AAC1C;","names":["data"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
// src/shared/bricks/props/number.ts
|
|
5
|
+
import { Type } from "@sinclair/typebox";
|
|
6
|
+
function number(title, options = {}) {
|
|
7
|
+
return Type.Number({ title, ...options });
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
number
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=chunk-XCZVD5H6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/shared/bricks/props/number.ts"],"sourcesContent":["import { Type, type NumberOptions } from \"@sinclair/typebox\";\nimport type { FieldMetadata } from \"./types\";\n\ntype NumberFieldOptions = NumberOptions & FieldMetadata;\n\nexport function number(title: string, options: NumberFieldOptions = {}) {\n return Type.Number({ title, ...options });\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/shared/bricks/props/number.ts"],"sourcesContent":["import { Type, type NumberOptions } from \"@sinclair/typebox\";\nimport type { FieldMetadata } from \"./types\";\n\ntype NumberFieldOptions = NumberOptions & FieldMetadata;\n\nexport function number(title: string, options: NumberFieldOptions = {}) {\n return Type.Number({ title, ...options });\n}\n"],"mappings":";;;;AAAA,SAAS,YAAgC;AAKlC,SAAS,OAAO,OAAe,UAA8B,CAAC,GAAG;AACtE,SAAO,KAAK,OAAO,EAAE,OAAO,GAAG,QAAQ,CAAC;AAC1C;","names":[]}
|