@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
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { type TArray, type TObject, type TSchema, Kind } from "@sinclair/typebox";
|
|
1
|
+
import { type TArray, type TObject, type TSchema, Kind, type Static } from "@sinclair/typebox";
|
|
2
2
|
import type { PageAttributes } from "../attributes";
|
|
3
|
-
import {
|
|
3
|
+
import { schemaRegistry } from "./schema-registry";
|
|
4
|
+
import { Cabidela } from "@cloudflare/cabidela";
|
|
5
|
+
import { defaultsDeep as applyDefaultsDeep } from "lodash-es";
|
|
4
6
|
|
|
5
7
|
export function normalizeSchemaEnum(schema: TSchema): Array<{ const: string; title: string }> {
|
|
6
8
|
if (!("enum" in schema)) {
|
|
@@ -149,7 +151,7 @@ function resolveSchemaRecursive(schema: TSchema, visited: Set<string>): TSchema
|
|
|
149
151
|
return schema; // Return original schema to avoid infinite loop
|
|
150
152
|
}
|
|
151
153
|
|
|
152
|
-
const resolved =
|
|
154
|
+
const resolved = schemaRegistry.get(schema.$ref);
|
|
153
155
|
if (!resolved) {
|
|
154
156
|
console.error("Schema not found for reference:", schema);
|
|
155
157
|
return schema;
|
|
@@ -357,3 +359,16 @@ function resolveSchemaRecursive(schema: TSchema, visited: Set<string>): TSchema
|
|
|
357
359
|
|
|
358
360
|
return resolvedSchema as TSchema;
|
|
359
361
|
}
|
|
362
|
+
|
|
363
|
+
export function validate<T extends TSchema>(schema: TSchema, data: unknown): data is Static<T> {
|
|
364
|
+
const validator = new Cabidela(schema, {
|
|
365
|
+
fullErrors: true,
|
|
366
|
+
});
|
|
367
|
+
validator.validate(data);
|
|
368
|
+
|
|
369
|
+
// Mutate data with defaults
|
|
370
|
+
const defaults = getSchemaDefaults(schema as TObject | TArray);
|
|
371
|
+
applyDefaultsDeep(data, defaults);
|
|
372
|
+
|
|
373
|
+
return true;
|
|
374
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Check taht schemaRegistry contains all schemas and that $refs are resolved
|
|
2
|
+
import { describe, it, expect } from "vitest";
|
|
3
|
+
import { schemaRegistry } from "../schema-registry";
|
|
4
|
+
|
|
5
|
+
describe("Schema Registry", () => {
|
|
6
|
+
it("should contain all registered schemas", () => {
|
|
7
|
+
expect(schemaRegistry.has("styles:background")).toBe(true);
|
|
8
|
+
expect(schemaRegistry.has("styles:justifyContent")).toBe(true);
|
|
9
|
+
expect(schemaRegistry.has("assets:image")).toBe(true);
|
|
10
|
+
expect(schemaRegistry.has("content:text")).toBe(true);
|
|
11
|
+
expect(schemaRegistry.has("styles:alignItems")).toBe(true);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { describe, expect, test, beforeEach
|
|
1
|
+
import { describe, expect, test, beforeEach } from "vitest";
|
|
2
2
|
import { Type } from "@sinclair/typebox";
|
|
3
|
-
import { resolveSchema } from "../schema";
|
|
4
|
-
import { toLLMSchema } from "../llm";
|
|
5
|
-
import { ajv } from "../../ajv";
|
|
3
|
+
import { resolveSchema, validate } from "../schema";
|
|
4
|
+
import { inlineSchemaRefs, toLLMSchema } from "../llm";
|
|
6
5
|
import { sitemapSchema } from "~/shared/sitemap";
|
|
6
|
+
import { registerSchema, unregisterSchema } from "~/shared/utils/schema-registry";
|
|
7
|
+
import { type Section, sectionSchema, sectionSchemaLLM } from "~/shared/bricks";
|
|
7
8
|
|
|
8
9
|
describe("resolveSchema tests suite", () => {
|
|
9
10
|
beforeEach(() => {
|
|
10
11
|
// Clear any test schemas before each test
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
unregisterSchema("test:simple");
|
|
13
|
+
unregisterSchema("test:user");
|
|
14
|
+
unregisterSchema("test:address");
|
|
15
|
+
unregisterSchema("test:circular1");
|
|
16
|
+
unregisterSchema("test:circular2");
|
|
17
|
+
unregisterSchema("test:string");
|
|
18
|
+
unregisterSchema("test:number");
|
|
19
|
+
unregisterSchema("test:boolean");
|
|
20
|
+
unregisterSchema("test:base");
|
|
21
|
+
unregisterSchema("test:extended");
|
|
21
22
|
});
|
|
22
23
|
|
|
23
24
|
test("should return primitive types unchanged", () => {
|
|
@@ -44,7 +45,7 @@ describe("resolveSchema tests suite", () => {
|
|
|
44
45
|
email: Type.String({ format: "email" }),
|
|
45
46
|
});
|
|
46
47
|
|
|
47
|
-
|
|
48
|
+
registerSchema("test:user", userSchema);
|
|
48
49
|
|
|
49
50
|
const schemaWithRef = Type.Ref("test:user");
|
|
50
51
|
|
|
@@ -64,7 +65,7 @@ describe("resolveSchema tests suite", () => {
|
|
|
64
65
|
city: Type.String(),
|
|
65
66
|
});
|
|
66
67
|
|
|
67
|
-
|
|
68
|
+
registerSchema("test:address", addressSchema);
|
|
68
69
|
|
|
69
70
|
const schema = Type.Object({
|
|
70
71
|
name: Type.String(),
|
|
@@ -81,7 +82,7 @@ describe("resolveSchema tests suite", () => {
|
|
|
81
82
|
id: Type.Number(),
|
|
82
83
|
});
|
|
83
84
|
|
|
84
|
-
|
|
85
|
+
registerSchema("test:simple", itemSchema);
|
|
85
86
|
|
|
86
87
|
const schema = Type.Array(Type.Ref("test:simple"));
|
|
87
88
|
|
|
@@ -93,8 +94,8 @@ describe("resolveSchema tests suite", () => {
|
|
|
93
94
|
const stringSchema = Type.String();
|
|
94
95
|
const numberSchema = Type.Number();
|
|
95
96
|
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
registerSchema("test:string", stringSchema);
|
|
98
|
+
registerSchema("test:number", numberSchema);
|
|
98
99
|
|
|
99
100
|
const schema = Type.Tuple([Type.Ref("test:string"), Type.Ref("test:number")]);
|
|
100
101
|
|
|
@@ -106,8 +107,8 @@ describe("resolveSchema tests suite", () => {
|
|
|
106
107
|
const stringSchema = Type.String();
|
|
107
108
|
const numberSchema = Type.Number();
|
|
108
109
|
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
registerSchema("test:string", stringSchema);
|
|
111
|
+
registerSchema("test:number", numberSchema);
|
|
111
112
|
|
|
112
113
|
const schema = Type.Union([Type.Ref("test:string"), Type.Ref("test:number")]);
|
|
113
114
|
|
|
@@ -120,8 +121,8 @@ describe("resolveSchema tests suite", () => {
|
|
|
120
121
|
const stringSchema = Type.String();
|
|
121
122
|
const numberSchema = Type.Number();
|
|
122
123
|
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
registerSchema("test:string", stringSchema);
|
|
125
|
+
registerSchema("test:number", numberSchema);
|
|
125
126
|
|
|
126
127
|
const schema = {
|
|
127
128
|
oneOf: [Type.Ref("test:string"), Type.Ref("test:number")],
|
|
@@ -141,8 +142,8 @@ describe("resolveSchema tests suite", () => {
|
|
|
141
142
|
name: Type.String(),
|
|
142
143
|
});
|
|
143
144
|
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
registerSchema("test:base", baseSchema);
|
|
146
|
+
registerSchema("test:extended", extendedSchema);
|
|
146
147
|
|
|
147
148
|
const schema = Type.Intersect([Type.Ref("test:base"), Type.Ref("test:extended")]);
|
|
148
149
|
|
|
@@ -155,7 +156,7 @@ describe("resolveSchema tests suite", () => {
|
|
|
155
156
|
test("should resolve not schemas", () => {
|
|
156
157
|
const stringSchema = Type.String();
|
|
157
158
|
|
|
158
|
-
|
|
159
|
+
registerSchema("test:string", stringSchema);
|
|
159
160
|
|
|
160
161
|
const schema = Type.Not(Type.Ref("test:string"));
|
|
161
162
|
|
|
@@ -168,9 +169,9 @@ describe("resolveSchema tests suite", () => {
|
|
|
168
169
|
const numberSchema = Type.Number();
|
|
169
170
|
const booleanSchema = Type.Boolean();
|
|
170
171
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
registerSchema("test:string", stringSchema);
|
|
173
|
+
registerSchema("test:number", numberSchema);
|
|
174
|
+
registerSchema("test:boolean", booleanSchema);
|
|
174
175
|
|
|
175
176
|
const schema = {
|
|
176
177
|
if: Type.Ref("test:string"),
|
|
@@ -223,8 +224,8 @@ describe("resolveSchema tests suite", () => {
|
|
|
223
224
|
friends: Type.Array(Type.Ref("test:user")),
|
|
224
225
|
});
|
|
225
226
|
|
|
226
|
-
|
|
227
|
-
|
|
227
|
+
registerSchema("test:user", personSchema);
|
|
228
|
+
registerSchema("test:address", addressSchema);
|
|
228
229
|
|
|
229
230
|
const schema = Type.Object({
|
|
230
231
|
users: Type.Array(Type.Ref("test:user")),
|
|
@@ -239,30 +240,6 @@ describe("resolveSchema tests suite", () => {
|
|
|
239
240
|
expect(result.properties.users.items.properties.address.type).toBe("object");
|
|
240
241
|
expect(result.properties.users.items.properties.address.properties.street.type).toBe("string");
|
|
241
242
|
});
|
|
242
|
-
|
|
243
|
-
test("should handle refs in conditionals properly", () => {
|
|
244
|
-
const stringSchema = Type.String();
|
|
245
|
-
const numberSchema = Type.Number({ minimum: 0 });
|
|
246
|
-
|
|
247
|
-
ajv.addSchema(stringSchema, "test:string");
|
|
248
|
-
ajv.addSchema(numberSchema, "test:number");
|
|
249
|
-
|
|
250
|
-
const schema = Type.Object({
|
|
251
|
-
type: Type.String({ enum: ["string", "number"] }),
|
|
252
|
-
value: {
|
|
253
|
-
if: Type.Object({ type: Type.Const("string") }),
|
|
254
|
-
// biome-ignore lint/suspicious/noThenProperty: Required for JSON schema conditional validation
|
|
255
|
-
then: Type.Ref("test:string"),
|
|
256
|
-
else: Type.Ref("test:number"),
|
|
257
|
-
} as any,
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
const result = resolveSchema(schema);
|
|
261
|
-
|
|
262
|
-
expect(result.properties.value.then.type).toEqual(stringSchema.type);
|
|
263
|
-
expect(result.properties.value.else.type).toEqual(numberSchema.type);
|
|
264
|
-
expect(result.properties.value.else.minimum).toBe(0);
|
|
265
|
-
});
|
|
266
243
|
});
|
|
267
244
|
|
|
268
245
|
describe("toLLMSchema tests suite", () => {
|
|
@@ -721,4 +698,54 @@ describe("toLLMSchema tests suite", () => {
|
|
|
721
698
|
const transformed = toLLMSchema(sitemapSchema);
|
|
722
699
|
expect(transformed.items.properties.id.type).toEqual(sitemapSchema.items.properties.id.type);
|
|
723
700
|
});
|
|
701
|
+
|
|
702
|
+
test("test with existing sectionSchema", () => {
|
|
703
|
+
const transformed = toLLMSchema(sectionSchema);
|
|
704
|
+
// console.dir({ transformed }, { depth: null });
|
|
705
|
+
expect(transformed.properties.props.type).toEqual(sectionSchema.properties.props.type);
|
|
706
|
+
});
|
|
707
|
+
});
|
|
708
|
+
|
|
709
|
+
describe("inlineSchemaRefs", () => {
|
|
710
|
+
test("should inline simple $ref schemas", () => {
|
|
711
|
+
const inlined = inlineSchemaRefs(sectionSchema);
|
|
712
|
+
expect(inlined.properties.props.properties.colorPreset.$ref).toEqual("#/$defs/presets_color");
|
|
713
|
+
expect(inlined.$defs.presets_color).toBeDefined();
|
|
714
|
+
expect(inlined.$defs.presets_color.type).toBe("object");
|
|
715
|
+
});
|
|
716
|
+
});
|
|
717
|
+
|
|
718
|
+
describe("toLLMSchema consistency", () => {
|
|
719
|
+
test("toLLMSchema(sectionSchema) should equal sectionSchemaLLM", () => {
|
|
720
|
+
const transformed = toLLMSchema(sectionSchema);
|
|
721
|
+
expect(transformed).toEqual(sectionSchemaLLM);
|
|
722
|
+
|
|
723
|
+
expect(transformed.$defs.presets_color).toBeDefined();
|
|
724
|
+
expect(transformed.$defs.presets_color.type).toBe("object");
|
|
725
|
+
|
|
726
|
+
expect(sectionSchemaLLM.$defs.presets_color).toBeDefined();
|
|
727
|
+
expect(sectionSchemaLLM.$defs.presets_color.type).toBe("object");
|
|
728
|
+
});
|
|
729
|
+
});
|
|
730
|
+
|
|
731
|
+
describe("validation with validate()", () => {
|
|
732
|
+
test("should validate correct schema", () => {
|
|
733
|
+
expect(sectionSchemaLLM.$defs.presets_color).toBeDefined();
|
|
734
|
+
expect(sectionSchemaLLM.$defs.presets_color.type).toBe("object");
|
|
735
|
+
const validSectionExample: Section = {
|
|
736
|
+
id: "section1",
|
|
737
|
+
label: "Hero Section",
|
|
738
|
+
order: 1,
|
|
739
|
+
props: {
|
|
740
|
+
colorPreset: {
|
|
741
|
+
color: "primary-100",
|
|
742
|
+
},
|
|
743
|
+
maxWidth: "max-w-full",
|
|
744
|
+
verticalMargin: "28px",
|
|
745
|
+
direction: "flex-col",
|
|
746
|
+
},
|
|
747
|
+
bricks: [],
|
|
748
|
+
};
|
|
749
|
+
expect(() => validate(sectionSchemaLLM, validSectionExample)).not.toThrow();
|
|
750
|
+
});
|
|
724
751
|
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type SchemaOptions } from "@sinclair/typebox";
|
|
2
|
-
type EnumOption = {
|
|
3
|
-
title?: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
value: string;
|
|
6
|
-
icon?: string;
|
|
7
|
-
};
|
|
8
|
-
export declare function enumProp(title: string, defaultValue: string, opts: Omit<SchemaOptions, "title" | "default"> & {
|
|
9
|
-
options: EnumOption[] | string[];
|
|
10
|
-
displayAs?: "radio" | "select" | "button-group" | "icon-group";
|
|
11
|
-
}): import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<string>[]>;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=enum.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../../../src/shared/bricks/props/enum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAQ,MAAM,mBAAmB,CAAC;AAE7D,KAAK,UAAU,GAAG;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAgB,QAAQ,CACtB,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,SAAS,CAAC,GAAG;IAC/C,OAAO,EAAE,UAAU,EAAE,GAAG,MAAM,EAAE,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,cAAc,GAAG,YAAY,CAAC;CAChE,sFAsBF"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
-
|
|
3
|
-
import{b as s}from"./chunk-W33JMRRN.js";import{Type as r}from"@sinclair/typebox";function c(t){return t.type==="object"}function l({title:t,children:e,category:o="settings",metadata:a,options:n}){return c(e)?r.Composite([r.Object({}),e],{title:t,metadata:{category:o,group:!0,...a},...n}):r.Object(e,{title:t,...n,metadata:{category:o,group:!0,...a}})}function m(t){let e=t.metadata;return{title:t.title??t.metadata?.title,meta:e,tab:e.groupTab||"common"}}function P(t,e){let o={...s,...t},{alignSelf:a,grow:n,...p}=o,i={...p,...e?.noAlignSelf?{}:{alignSelf:a},...e?.noGrow?{}:{grow:n}};return r.Object(i,{...e,additionalProperties:!1})}var T=r.Array;export{l as a,m as b,P as c,T as d};
|
|
4
|
-
//# sourceMappingURL=chunk-3YVJ2ELD.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
-
|
|
3
|
-
import{a as o}from"./chunk-KFM6KXSE.js";import{a as e}from"./chunk-JMN3HTZU.js";import{Type as s}from"@sinclair/typebox";function d(t={}){return e(["shadow-none","shadow-sm","shadow-md","shadow-lg","shadow-xl","shadow-2xl"],{title:"Shadow",description:"Box shadow around the brick",enumNames:["None","Small","Medium","Large","XL","2XL"],"ui:placeholder":"Not specified","ui:field":"enum","ui:display":"select","ui:responsive":"desktop","ui:styleId":"styles:shadow",...t})}function u(t={}){return o("styles:shadow",t)}function r(t={}){return e(["text-shadow-none","text-shadow-sm","text-shadow-md","text-shadow-lg","text-shadow-xl"],{title:"Text shadow",enumNames:["None","S","M","L","XL"],"ui:display":"button-group","ui:placeholder":"Not specified","ui:field":"enum","ui:styleId":"styles:textShadow",examples:["text-shadow-sm","text-shadow-md","text-shadow-lg"],...t})}function m(t={}){return o("styles:textShadow",t)}function l({defaultValue:t=1,title:i="Opacity"}={}){return s.Number({title:i,minimum:.1,maximum:1,default:t,multipleOf:.1,"ui:field":"slider","ui:unit":"%","ui:multiplier":100,examples:[.5,.75,1]})}export{d as a,u as b,r as c,m as d,l as e};
|
|
4
|
-
//# sourceMappingURL=chunk-4BTB3MU2.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
-
|
|
3
|
-
import{Type as t}from"@sinclair/typebox";var i=t.String({minLength:30,maxLength:500,description:"User prompt for the site, describing the purpose and main features of the site."});export{i as a};
|
|
4
|
-
//# sourceMappingURL=chunk-4WDWJA3N.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
-
|
|
3
|
-
import{Type as t}from"@sinclair/typebox";var i=t.Array(t.Object({title:t.Optional(t.String({title:"Title",description:"The title of the RSS feed item"})),link:t.Optional(t.String({title:"Link",description:"The link to the RSS feed item"})),creator:t.Optional(t.String({title:"Creator",description:"The creator of the RSS feed item"})),content:t.Optional(t.String({title:"Content",description:"The content of the RSS feed item"})),pubDate:t.Optional(t.String({title:"Pub Date",description:"The publication date of the RSS feed item"}))}),{title:"RSS Feed",description:"RSS feed items"});export{i as a};
|
|
4
|
-
//# sourceMappingURL=chunk-5O4Z3YQY.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
-
|
|
3
|
-
import{a as e}from"./chunk-KFM6KXSE.js";import{a as n}from"./chunk-JMN3HTZU.js";import{Type as s}from"@sinclair/typebox";function f(t={}){return n(["inherit","text-xs","text-sm","text-base","text-lg","text-xl"],{enumNames:["Same as parent","Extra small","Small","Medium","Large","Extra large"],default:"inherit",title:"Font size","ui:styleId":"styles:fontSize","ui:field":"enum","ui:display":"select",...t})}function g(t={}){return e("styles:fontSize",t)}function S(t={}){return n(["inherit","text-xs","text-sm","text-base","text-lg","text-xl","text-2xl","text-3xl","text-4xl","text-5xl","text-6xl","text-7xl"],{enumNames:["Same as parent","Extra small","Small","Medium","Large","Extra large","Extra large (2x)","Extra large (3x)","Extra large (4x)","Extra large (5x)","Extra large (6x)","Extra large (7x)"],default:"inherit",title:"Font size","ui:styleId":"styles:fontSize","ui:field":"enum","ui:display":"select",...t})}function m(t={}){return e("styles:fontSizeXL",t)}function d({title:t="Text",default:i,showInSettings:o,disableSizing:a=!1,disableAlignment:r=!1,...l}={}){return s.String({title:t,description:"Text content. Can contain basic HTML tags like `<strong>`, `<em>`, `<br>` and `<a>` as well as `<p>` and `<span>` and lists <ul> <ol> <li>.",default:i??"My text","ui:disable-sizing":a,"ui:disable-alignment":r,...l,"ui:field":o?"string":"hidden"})}function y(t={}){return e("content:text",t)}export{f as a,g as b,S as c,m as d,d as e,y as f};
|
|
4
|
-
//# sourceMappingURL=chunk-5YRC3IT3.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
-
|
|
3
|
-
import{get as i}from"lodash-es";function a(t){return Object.fromEntries(Object.entries(t).map(([r,e])=>[r,e.toString()]))}function c(t){return function(e,n){let o=n.trim();return String(i(t,o))??""}}var g=/{{(.+?)}}/g;export{a,c as b,g as c};
|
|
4
|
-
//# sourceMappingURL=chunk-6HLU4UI2.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
-
|
|
3
|
-
import{Type as e}from"@sinclair/typebox";function i(t="Database",r){return e.String({"ui:field":"datarecord",title:t,...r})}export{i as a};
|
|
4
|
-
//# sourceMappingURL=chunk-6I3ONVU6.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
-
|
|
3
|
-
import{c,d as i}from"./chunk-3YVJ2ELD.js";import{a}from"./chunk-RJYZ5FAR.js";import{a as u}from"./chunk-AFVJZPLS.js";import{b as n}from"./chunk-CCI4C3TM.js";import{a as e,d as r}from"./chunk-A3GF4PYW.js";import{b as o}from"./chunk-5YRC3IT3.js";import{c as s}from"./chunk-CZRCW5EN.js";import{c as l}from"./chunk-OHNYCXPX.js";import{Type as t}from"@sinclair/typebox";import{VscLayoutPanelOff as p}from"react-icons/vsc";var d=a({type:"footer",name:"Footer",category:"layout",description:"A footer with links and an optional logo.",aiInstructions:"This brick should be used on most sites/pages. It must be placed on its own section.",icon:p,staticClasses:"flex-1",isGlobalBrick:!0,hideInLibrary:!0,resizable:!1,movable:!1,defaultWidth:{desktop:"100%",mobile:"100%"},props:c({colorPreset:t.Optional(s({title:"Color preset",default:{color:"neutral-600"}})),padding:t.Optional(l({default:"4rem",description:"Padding inside the footer.",title:"Padding","ui:responsive":!0,"ui:placeholder":"Not specified","ui:styleId":"styles:padding"})),logo:t.Optional(n({title:"Logo","ui:no-object-options":!0,"ui:no-alt-text":!0})),fontSize:t.Optional(o({default:"text-sm","ui:no-extra-large-sizes":!0})),linksSections:i(t.Object({sectionTitle:e("Title"),links:i(t.Object({title:e("Title"),url:r()}),{title:"Links"})}),{default:[{sectionTitle:"Links",links:[{title:"Link",url:"/"}]}],title:"Links","ui:displayField":"sectionTitle","ui:options":{orderable:!0,removable:!0,addable:!0},description:"List of Links Sections",metadata:{category:"content"}})},{noGrow:!0,noAlignSelf:!0})});function C(){return u(d.props)}var P=[{description:"Simple footer with logo on the left",type:"footer",props:{logo:{src:"https://via.placeholder.com/120x40.png?text=Logo",alt:"Company logo"},linksSections:[{sectionTitle:"Quick Links",links:[{title:"Home",url:"/"},{title:"About",url:"/about"},{title:"Contact",url:"/contact"}]},{sectionTitle:"Legal",links:[{title:"Privacy Policy",url:"/privacy"},{title:"Terms of Service",url:"/terms"}]}]}},{description:"Corporate footer with centered logo",type:"footer",props:{logo:{src:"https://via.placeholder.com/150x50.png?text=Corporate",alt:"Corporate logo"},linksSections:[{sectionTitle:"Products",links:[{title:"Software Solutions",url:"/products/software"},{title:"Consulting",url:"/products/consulting"},{title:"Support",url:"/products/support"},{title:"Training",url:"/products/training"}]},{sectionTitle:"Company",links:[{title:"About Us",url:"/about"},{title:"Careers",url:"/careers"},{title:"News",url:"/news"},{title:"Investors",url:"/investors"}]},{sectionTitle:"Resources",links:[{title:"Documentation",url:"/docs"},{title:"API Reference",url:"/api"},{title:"Community",url:"/community"},{title:"Blog",url:"/blog"}]}]}},{description:"E-commerce footer with logo on the right",type:"footer",props:{logo:{src:"https://via.placeholder.com/140x45.png?text=Shop",alt:"Shop logo"},linksSections:[{sectionTitle:"Shop",links:[{title:"All Products",url:"/products"},{title:"New Arrivals",url:"/new"},{title:"Sale",url:"/sale"},{title:"Gift Cards",url:"/gift-cards"}]},{sectionTitle:"Customer Service",links:[{title:"Help Center",url:"/help"},{title:"Returns",url:"/returns"},{title:"Shipping Info",url:"/shipping"},{title:"Size Guide",url:"/size-guide"}]},{sectionTitle:"Account",links:[{title:"My Account",url:"/account"},{title:"Order History",url:"/orders"},{title:"Wishlist",url:"/wishlist"}]}]}},{description:"Large organization footer with multiple rows",type:"footer",props:{logo:{src:"https://via.placeholder.com/180x60.png?text=Enterprise",alt:"Enterprise logo"},linksSections:[{sectionTitle:"Products & Services",links:[{title:"Cloud Solutions",url:"/cloud"},{title:"Data Analytics",url:"/analytics"},{title:"AI & Machine Learning",url:"/ai"},{title:"Cybersecurity",url:"/security"},{title:"DevOps Tools",url:"/devops"},{title:"IoT Platform",url:"/iot"}]},{sectionTitle:"Industries",links:[{title:"Healthcare",url:"/industries/healthcare"},{title:"Finance",url:"/industries/finance"},{title:"Retail",url:"/industries/retail"},{title:"Manufacturing",url:"/industries/manufacturing"},{title:"Education",url:"/industries/education"},{title:"Government",url:"/industries/government"}]},{sectionTitle:"Resources",links:[{title:"Documentation",url:"/docs"},{title:"API Reference",url:"/api"},{title:"Tutorials",url:"/tutorials"},{title:"Webinars",url:"/webinars"},{title:"White Papers",url:"/whitepapers"},{title:"Case Studies",url:"/case-studies"}]},{sectionTitle:"Support & Community",links:[{title:"Help Center",url:"/help"},{title:"Community Forum",url:"/forum"},{title:"Contact Support",url:"/support"},{title:"Service Status",url:"/status"},{title:"Partner Portal",url:"/partners"},{title:"Developer Hub",url:"/developers"}]}]}},{description:"Startup footer with minimal links and left logo",type:"footer",props:{logo:{src:"https://via.placeholder.com/100x35.png?text=Startup",alt:"Startup logo"},linksSections:[{sectionTitle:"Company",links:[{title:"About",url:"/about"},{title:"Team",url:"/team"},{title:"Jobs",url:"/jobs"}]},{sectionTitle:"Product",links:[{title:"Features",url:"/features"},{title:"Pricing",url:"/pricing"},{title:"Demo",url:"/demo"}]},{sectionTitle:"Support",links:[{title:"Help",url:"/help"},{title:"Contact",url:"/contact"}]}]}},{description:"Agency footer with centered logo and creative sections",type:"footer",props:{logo:{src:"https://via.placeholder.com/130x45.png?text=Agency",alt:"Creative agency logo"},linksSections:[{sectionTitle:"Services",links:[{title:"Web Design",url:"/services/web-design"},{title:"Branding",url:"/services/branding"},{title:"Digital Marketing",url:"/services/marketing"},{title:"Photography",url:"/services/photography"}]},{sectionTitle:"Portfolio",links:[{title:"Recent Work",url:"/portfolio"},{title:"Case Studies",url:"/case-studies"},{title:"Client Reviews",url:"/reviews"}]},{sectionTitle:"Connect",links:[{title:"Contact Us",url:"/contact"},{title:"Get Quote",url:"/quote"},{title:"Newsletter",url:"/newsletter"}]}]}},{description:"SaaS platform footer with comprehensive links",type:"footer",props:{logo:{src:"https://via.placeholder.com/160x50.png?text=SaaS+Platform",alt:"SaaS platform logo"},linksSections:[{sectionTitle:"Platform",links:[{title:"Dashboard",url:"/dashboard"},{title:"Analytics",url:"/analytics"},{title:"Integrations",url:"/integrations"},{title:"API",url:"/api"}]},{sectionTitle:"Solutions",links:[{title:"For Startups",url:"/solutions/startups"},{title:"For Enterprise",url:"/solutions/enterprise"},{title:"For Agencies",url:"/solutions/agencies"},{title:"For Developers",url:"/solutions/developers"}]},{sectionTitle:"Resources",links:[{title:"Blog",url:"/blog"},{title:"Documentation",url:"/docs"},{title:"Help Center",url:"/help"},{title:"Community",url:"/community"}]},{sectionTitle:"Company",links:[{title:"About Us",url:"/about"},{title:"Careers",url:"/careers"},{title:"Press",url:"/press"},{title:"Legal",url:"/legal"}]}]}},{description:"Non-profit footer with mission-focused links",type:"footer",props:{logo:{src:"https://via.placeholder.com/140x50.png?text=Non+Profit",alt:"Non-profit organization logo"},linksSections:[{sectionTitle:"Our Work",links:[{title:"Programs",url:"/programs"},{title:"Impact",url:"/impact"},{title:"Success Stories",url:"/stories"},{title:"Research",url:"/research"}]},{sectionTitle:"Get Involved",links:[{title:"Donate",url:"/donate"},{title:"Volunteer",url:"/volunteer"},{title:"Events",url:"/events"},{title:"Partner with Us",url:"/partnerships"}]},{sectionTitle:"About",links:[{title:"Our Mission",url:"/mission"},{title:"Leadership",url:"/leadership"},{title:"Annual Reports",url:"/reports"},{title:"Contact",url:"/contact"}]}]}},{description:"Tech blog footer with right-aligned logo",type:"footer",props:{logo:{src:"https://via.placeholder.com/120x40.png?text=Tech+Blog",alt:"Tech blog logo"},linksSections:[{sectionTitle:"Categories",links:[{title:"Web Development",url:"/category/web-dev"},{title:"AI & ML",url:"/category/ai-ml"},{title:"DevOps",url:"/category/devops"},{title:"Mobile",url:"/category/mobile"}]},{sectionTitle:"Popular",links:[{title:"Latest Posts",url:"/latest"},{title:"Trending",url:"/trending"},{title:"Best of 2024",url:"/best-2024"},{title:"Tutorials",url:"/tutorials"}]},{sectionTitle:"Community",links:[{title:"Newsletter",url:"/newsletter"},{title:"Discord",url:"/discord"},{title:"Contributors",url:"/contributors"},{title:"Write for Us",url:"/write"}]}]}},{description:"Restaurant footer with location and menu links",type:"footer",props:{logo:{src:"https://via.placeholder.com/150x60.png?text=Restaurant",alt:"Restaurant logo"},linksSections:[{sectionTitle:"Menu",links:[{title:"Appetizers",url:"/menu/appetizers"},{title:"Main Courses",url:"/menu/mains"},{title:"Desserts",url:"/menu/desserts"},{title:"Beverages",url:"/menu/drinks"}]},{sectionTitle:"Services",links:[{title:"Reservations",url:"/reservations"},{title:"Catering",url:"/catering"},{title:"Private Events",url:"/events"},{title:"Gift Cards",url:"/gift-cards"}]},{sectionTitle:"Info",links:[{title:"About Us",url:"/about"},{title:"Location",url:"/location"},{title:"Hours",url:"/hours"},{title:"Contact",url:"/contact"}]}]}}];export{d as a,C as b,P as c};
|
|
4
|
-
//# sourceMappingURL=chunk-7A2JNQX3.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/shared/bricks/manifests/footer.manifest.ts"],"sourcesContent":["import { type Static, Type } from \"@sinclair/typebox\";\nimport { VscLayoutPanelOff } from \"react-icons/vsc\";\nimport { defineBrickManifest } from \"~/shared/brick-manifest\";\nimport { array, defineProps } from \"../props/helpers\";\nimport { imageRef } from \"../props/image\";\nimport { colorPresetRef } from \"../props/color-preset\";\nimport { string, urlOrPageIdRef } from \"../props/string\";\nimport { fontSizeRef } from \"../props/text\";\nimport type { BrickProps } from \"../props/types\";\nimport { toLLMSchema } from \"~/shared/utils/llm\";\nimport { cssLengthRef } from \"../props/css-length\";\n\nexport const manifest = defineBrickManifest({\n type: \"footer\",\n name: \"Footer\",\n category: \"layout\",\n description: \"A footer with links and an optional logo.\",\n aiInstructions: \"This brick should be used on most sites/pages. It must be placed on its own section.\",\n icon: VscLayoutPanelOff,\n staticClasses: \"flex-1\",\n isGlobalBrick: true,\n hideInLibrary: true,\n resizable: false,\n movable: false,\n defaultWidth: {\n desktop: \"100%\",\n mobile: \"100%\",\n },\n props: defineProps(\n {\n colorPreset: Type.Optional(\n colorPresetRef({\n title: \"Color preset\",\n default: { color: \"neutral-600\" },\n }),\n ),\n padding: Type.Optional(\n cssLengthRef({\n default: \"4rem\",\n description: \"Padding inside the footer.\",\n title: \"Padding\",\n \"ui:responsive\": true,\n \"ui:placeholder\": \"Not specified\",\n \"ui:styleId\": \"styles:padding\",\n }),\n ),\n logo: Type.Optional(imageRef({ title: \"Logo\", \"ui:no-object-options\": true, \"ui:no-alt-text\": true })),\n fontSize: Type.Optional(fontSizeRef({ default: \"text-sm\", \"ui:no-extra-large-sizes\": true })),\n // rows:Type.Optional(number(\"Rows\", { default: 1, \"ui:field\": \"slider\", minimum: 1, maximum: 5 })),\n linksSections: array(\n Type.Object({\n sectionTitle: string(\"Title\"),\n links: array(\n Type.Object({\n title: string(\"Title\"),\n url: urlOrPageIdRef(),\n }),\n {\n title: \"Links\",\n },\n ),\n }),\n {\n default: [\n {\n sectionTitle: \"Links\",\n links: [\n {\n title: \"Link\",\n url: \"/\",\n },\n ],\n },\n ],\n title: \"Links\",\n \"ui:displayField\": \"sectionTitle\",\n \"ui:options\": {\n orderable: true, // Enable drag & drop reordering\n removable: true, // Enable delete button\n addable: true, // Enable add button\n },\n description: \"List of Links Sections\",\n metadata: {\n category: \"content\",\n },\n },\n ),\n },\n { noGrow: true, noAlignSelf: true },\n ),\n});\n\nexport type Manifest = typeof manifest;\n\nexport function getFooterSchemaForLLM() {\n return toLLMSchema(manifest.props);\n}\n\nexport type FooterProps = Static<Manifest[\"props\"]>;\n\nexport const examples: {\n description: string;\n type: string;\n props: BrickProps<Manifest>[\"brick\"][\"props\"];\n}[] = [\n {\n description: \"Simple footer with logo on the left\",\n type: \"footer\",\n props: {\n // backgroundColor: \"#f8f9fa\",\n logo: {\n src: \"https://via.placeholder.com/120x40.png?text=Logo\",\n alt: \"Company logo\",\n },\n linksSections: [\n {\n sectionTitle: \"Quick Links\",\n links: [\n { title: \"Home\", url: \"/\" },\n { title: \"About\", url: \"/about\" },\n { title: \"Contact\", url: \"/contact\" },\n ],\n },\n {\n sectionTitle: \"Legal\",\n links: [\n { title: \"Privacy Policy\", url: \"/privacy\" },\n { title: \"Terms of Service\", url: \"/terms\" },\n ],\n },\n ],\n },\n },\n {\n description: \"Corporate footer with centered logo\",\n type: \"footer\",\n props: {\n // backgroundColor: \"#2c3e50\",\n logo: {\n src: \"https://via.placeholder.com/150x50.png?text=Corporate\",\n alt: \"Corporate logo\",\n },\n linksSections: [\n {\n sectionTitle: \"Products\",\n links: [\n { title: \"Software Solutions\", url: \"/products/software\" },\n { title: \"Consulting\", url: \"/products/consulting\" },\n { title: \"Support\", url: \"/products/support\" },\n { title: \"Training\", url: \"/products/training\" },\n ],\n },\n {\n sectionTitle: \"Company\",\n links: [\n { title: \"About Us\", url: \"/about\" },\n { title: \"Careers\", url: \"/careers\" },\n { title: \"News\", url: \"/news\" },\n { title: \"Investors\", url: \"/investors\" },\n ],\n },\n {\n sectionTitle: \"Resources\",\n links: [\n { title: \"Documentation\", url: \"/docs\" },\n { title: \"API Reference\", url: \"/api\" },\n { title: \"Community\", url: \"/community\" },\n { title: \"Blog\", url: \"/blog\" },\n ],\n },\n ],\n },\n },\n {\n description: \"E-commerce footer with logo on the right\",\n type: \"footer\",\n props: {\n // backgroundColor: \"#ffffff\",\n logo: {\n src: \"https://via.placeholder.com/140x45.png?text=Shop\",\n alt: \"Shop logo\",\n },\n linksSections: [\n {\n sectionTitle: \"Shop\",\n links: [\n { title: \"All Products\", url: \"/products\" },\n { title: \"New Arrivals\", url: \"/new\" },\n { title: \"Sale\", url: \"/sale\" },\n { title: \"Gift Cards\", url: \"/gift-cards\" },\n ],\n },\n {\n sectionTitle: \"Customer Service\",\n links: [\n { title: \"Help Center\", url: \"/help\" },\n { title: \"Returns\", url: \"/returns\" },\n { title: \"Shipping Info\", url: \"/shipping\" },\n { title: \"Size Guide\", url: \"/size-guide\" },\n ],\n },\n {\n sectionTitle: \"Account\",\n links: [\n { title: \"My Account\", url: \"/account\" },\n { title: \"Order History\", url: \"/orders\" },\n { title: \"Wishlist\", url: \"/wishlist\" },\n ],\n },\n ],\n },\n },\n {\n description: \"Large organization footer with multiple rows\",\n type: \"footer\",\n props: {\n // backgroundColor: \"#1a1a1a\",\n logo: {\n src: \"https://via.placeholder.com/180x60.png?text=Enterprise\",\n alt: \"Enterprise logo\",\n },\n linksSections: [\n {\n sectionTitle: \"Products & Services\",\n links: [\n { title: \"Cloud Solutions\", url: \"/cloud\" },\n { title: \"Data Analytics\", url: \"/analytics\" },\n { title: \"AI & Machine Learning\", url: \"/ai\" },\n { title: \"Cybersecurity\", url: \"/security\" },\n { title: \"DevOps Tools\", url: \"/devops\" },\n { title: \"IoT Platform\", url: \"/iot\" },\n ],\n },\n {\n sectionTitle: \"Industries\",\n links: [\n { title: \"Healthcare\", url: \"/industries/healthcare\" },\n { title: \"Finance\", url: \"/industries/finance\" },\n { title: \"Retail\", url: \"/industries/retail\" },\n { title: \"Manufacturing\", url: \"/industries/manufacturing\" },\n { title: \"Education\", url: \"/industries/education\" },\n { title: \"Government\", url: \"/industries/government\" },\n ],\n },\n {\n sectionTitle: \"Resources\",\n links: [\n { title: \"Documentation\", url: \"/docs\" },\n { title: \"API Reference\", url: \"/api\" },\n { title: \"Tutorials\", url: \"/tutorials\" },\n { title: \"Webinars\", url: \"/webinars\" },\n { title: \"White Papers\", url: \"/whitepapers\" },\n { title: \"Case Studies\", url: \"/case-studies\" },\n ],\n },\n {\n sectionTitle: \"Support & Community\",\n links: [\n { title: \"Help Center\", url: \"/help\" },\n { title: \"Community Forum\", url: \"/forum\" },\n { title: \"Contact Support\", url: \"/support\" },\n { title: \"Service Status\", url: \"/status\" },\n { title: \"Partner Portal\", url: \"/partners\" },\n { title: \"Developer Hub\", url: \"/developers\" },\n ],\n },\n ],\n },\n },\n {\n description: \"Startup footer with minimal links and left logo\",\n type: \"footer\",\n props: {\n // backgroundColor: \"#f5f5f5\",\n logo: {\n src: \"https://via.placeholder.com/100x35.png?text=Startup\",\n alt: \"Startup logo\",\n },\n linksSections: [\n {\n sectionTitle: \"Company\",\n links: [\n { title: \"About\", url: \"/about\" },\n { title: \"Team\", url: \"/team\" },\n { title: \"Jobs\", url: \"/jobs\" },\n ],\n },\n {\n sectionTitle: \"Product\",\n links: [\n { title: \"Features\", url: \"/features\" },\n { title: \"Pricing\", url: \"/pricing\" },\n { title: \"Demo\", url: \"/demo\" },\n ],\n },\n {\n sectionTitle: \"Support\",\n links: [\n { title: \"Help\", url: \"/help\" },\n { title: \"Contact\", url: \"/contact\" },\n ],\n },\n ],\n },\n },\n {\n description: \"Agency footer with centered logo and creative sections\",\n type: \"footer\",\n props: {\n // backgroundColor: \"#6366f1\",\n logo: {\n src: \"https://via.placeholder.com/130x45.png?text=Agency\",\n alt: \"Creative agency logo\",\n },\n linksSections: [\n {\n sectionTitle: \"Services\",\n links: [\n { title: \"Web Design\", url: \"/services/web-design\" },\n { title: \"Branding\", url: \"/services/branding\" },\n { title: \"Digital Marketing\", url: \"/services/marketing\" },\n { title: \"Photography\", url: \"/services/photography\" },\n ],\n },\n {\n sectionTitle: \"Portfolio\",\n links: [\n { title: \"Recent Work\", url: \"/portfolio\" },\n { title: \"Case Studies\", url: \"/case-studies\" },\n { title: \"Client Reviews\", url: \"/reviews\" },\n ],\n },\n {\n sectionTitle: \"Connect\",\n links: [\n { title: \"Contact Us\", url: \"/contact\" },\n { title: \"Get Quote\", url: \"/quote\" },\n { title: \"Newsletter\", url: \"/newsletter\" },\n ],\n },\n ],\n },\n },\n {\n description: \"SaaS platform footer with comprehensive links\",\n type: \"footer\",\n props: {\n logo: {\n src: \"https://via.placeholder.com/160x50.png?text=SaaS+Platform\",\n alt: \"SaaS platform logo\",\n },\n linksSections: [\n {\n sectionTitle: \"Platform\",\n links: [\n { title: \"Dashboard\", url: \"/dashboard\" },\n { title: \"Analytics\", url: \"/analytics\" },\n { title: \"Integrations\", url: \"/integrations\" },\n { title: \"API\", url: \"/api\" },\n ],\n },\n {\n sectionTitle: \"Solutions\",\n links: [\n { title: \"For Startups\", url: \"/solutions/startups\" },\n { title: \"For Enterprise\", url: \"/solutions/enterprise\" },\n { title: \"For Agencies\", url: \"/solutions/agencies\" },\n { title: \"For Developers\", url: \"/solutions/developers\" },\n ],\n },\n {\n sectionTitle: \"Resources\",\n links: [\n { title: \"Blog\", url: \"/blog\" },\n { title: \"Documentation\", url: \"/docs\" },\n { title: \"Help Center\", url: \"/help\" },\n { title: \"Community\", url: \"/community\" },\n ],\n },\n {\n sectionTitle: \"Company\",\n links: [\n { title: \"About Us\", url: \"/about\" },\n { title: \"Careers\", url: \"/careers\" },\n { title: \"Press\", url: \"/press\" },\n { title: \"Legal\", url: \"/legal\" },\n ],\n },\n ],\n },\n },\n {\n description: \"Non-profit footer with mission-focused links\",\n type: \"footer\",\n props: {\n logo: {\n src: \"https://via.placeholder.com/140x50.png?text=Non+Profit\",\n alt: \"Non-profit organization logo\",\n },\n linksSections: [\n {\n sectionTitle: \"Our Work\",\n links: [\n { title: \"Programs\", url: \"/programs\" },\n { title: \"Impact\", url: \"/impact\" },\n { title: \"Success Stories\", url: \"/stories\" },\n { title: \"Research\", url: \"/research\" },\n ],\n },\n {\n sectionTitle: \"Get Involved\",\n links: [\n { title: \"Donate\", url: \"/donate\" },\n { title: \"Volunteer\", url: \"/volunteer\" },\n { title: \"Events\", url: \"/events\" },\n { title: \"Partner with Us\", url: \"/partnerships\" },\n ],\n },\n {\n sectionTitle: \"About\",\n links: [\n { title: \"Our Mission\", url: \"/mission\" },\n { title: \"Leadership\", url: \"/leadership\" },\n { title: \"Annual Reports\", url: \"/reports\" },\n { title: \"Contact\", url: \"/contact\" },\n ],\n },\n ],\n },\n },\n {\n description: \"Tech blog footer with right-aligned logo\",\n type: \"footer\",\n props: {\n logo: {\n src: \"https://via.placeholder.com/120x40.png?text=Tech+Blog\",\n alt: \"Tech blog logo\",\n },\n linksSections: [\n {\n sectionTitle: \"Categories\",\n links: [\n { title: \"Web Development\", url: \"/category/web-dev\" },\n { title: \"AI & ML\", url: \"/category/ai-ml\" },\n { title: \"DevOps\", url: \"/category/devops\" },\n { title: \"Mobile\", url: \"/category/mobile\" },\n ],\n },\n {\n sectionTitle: \"Popular\",\n links: [\n { title: \"Latest Posts\", url: \"/latest\" },\n { title: \"Trending\", url: \"/trending\" },\n { title: \"Best of 2024\", url: \"/best-2024\" },\n { title: \"Tutorials\", url: \"/tutorials\" },\n ],\n },\n {\n sectionTitle: \"Community\",\n links: [\n { title: \"Newsletter\", url: \"/newsletter\" },\n { title: \"Discord\", url: \"/discord\" },\n { title: \"Contributors\", url: \"/contributors\" },\n { title: \"Write for Us\", url: \"/write\" },\n ],\n },\n ],\n },\n },\n {\n description: \"Restaurant footer with location and menu links\",\n type: \"footer\",\n props: {\n logo: {\n src: \"https://via.placeholder.com/150x60.png?text=Restaurant\",\n alt: \"Restaurant logo\",\n },\n linksSections: [\n {\n sectionTitle: \"Menu\",\n links: [\n { title: \"Appetizers\", url: \"/menu/appetizers\" },\n { title: \"Main Courses\", url: \"/menu/mains\" },\n { title: \"Desserts\", url: \"/menu/desserts\" },\n { title: \"Beverages\", url: \"/menu/drinks\" },\n ],\n },\n {\n sectionTitle: \"Services\",\n links: [\n { title: \"Reservations\", url: \"/reservations\" },\n { title: \"Catering\", url: \"/catering\" },\n { title: \"Private Events\", url: \"/events\" },\n { title: \"Gift Cards\", url: \"/gift-cards\" },\n ],\n },\n {\n sectionTitle: \"Info\",\n links: [\n { title: \"About Us\", url: \"/about\" },\n { title: \"Location\", url: \"/location\" },\n { title: \"Hours\", url: \"/hours\" },\n { title: \"Contact\", url: \"/contact\" },\n ],\n },\n ],\n },\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,KAAM,CACJ,IAAK,yDACL,IAAK,iBACP,EACA,cAAe,CACb,CACE,aAAc,OACd,MAAO,CACL,CAAE,MAAO,aAAc,IAAK,kBAAmB,EAC/C,CAAE,MAAO,eAAgB,IAAK,aAAc,EAC5C,CAAE,MAAO,WAAY,IAAK,gBAAiB,EAC3C,CAAE,MAAO,YAAa,IAAK,cAAe,CAC5C,CACF,EACA,CACE,aAAc,WACd,MAAO,CACL,CAAE,MAAO,eAAgB,IAAK,eAAgB,EAC9C,CAAE,MAAO,WAAY,IAAK,WAAY,EACtC,CAAE,MAAO,iBAAkB,IAAK,SAAU,EAC1C,CAAE,MAAO,aAAc,IAAK,aAAc,CAC5C,CACF,EACA,CACE,aAAc,OACd,MAAO,CACL,CAAE,MAAO,WAAY,IAAK,QAAS,EACnC,CAAE,MAAO,WAAY,IAAK,WAAY,EACtC,CAAE,MAAO,QAAS,IAAK,QAAS,EAChC,CAAE,MAAO,UAAW,IAAK,UAAW,CACtC,CACF,CACF,CACF,CACF,CACF","names":["Type","VscLayoutPanelOff","manifest","defineBrickManifest","VscLayoutPanelOff","defineProps","Type","colorPresetRef","cssLengthRef","imageRef","fontSizeRef","array","string","urlOrPageIdRef","getFooterSchemaForLLM","toLLMSchema","examples"]}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
-
|
|
3
|
-
import{a as n}from"./chunk-KFM6KXSE.js";import{Type as i}from"@sinclair/typebox";function l(t,e={}){return i.String({title:t,...e})}function p(t="URL",e){return i.String({title:t,format:"url","ui:field":"url",default:e})}var r=i.String({"ui:field":"page-id"});function u(t="URL",e){return i.Union([i.String({format:"url"}),r],{default:e,title:t,metadata:{category:"content"},"ui:field":"url-page-id","ai:instructions":"This field can be a URL or a page ID. Use the page ID when linking to a internal page, and a URL for external links."})}function c(t={}){return n("content:urlOrPageId",{...t})}function d(t,e={}){return i.String({title:t??"Icon","ai:instructions":"Use a iconify reference like 'mdi:heart' or 'fa-solid:coffee'.","ui:field":"iconify",metadata:{category:"content"},...e})}function f(t={}){return n("assets:icon",t)}export{l as a,p as b,u as c,c as d,d as e,f};
|
|
4
|
-
//# sourceMappingURL=chunk-A3GF4PYW.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
-
|
|
3
|
-
import{a as l}from"./chunk-AFVJZPLS.js";import{a}from"./chunk-JMN3HTZU.js";import{Type as e}from"@sinclair/typebox";import c from"chroma-js";import{colorPalette as m}from"@upstart.gg/style-system/colors";var v=[{value:"system-ui",label:"System UI"},{value:"transitional",label:"Transitional"},{value:"old-style",label:"Old style"},{value:"humanist",label:"Humanist"},{value:"geometric-humanist",label:"Geometric humanist"},{value:"classical-humanist",label:"Classical humanist"},{value:"neo-grotesque",label:"Neo-grotesque"},{value:"monospace-slab-serif",label:"Monospace slab serif"},{value:"monospace-code",label:"Monospace code"},{value:"industrial",label:"Industrial"},{value:"rounded-sans",label:"Rounded sans"},{value:"slab-serif",label:"Slab serif"},{value:"antique",label:"Antique"},{value:"didone",label:"Didone"},{value:"handwritten",label:"Handwritten"}],h=e.Object({type:a(["stack","theme","google"],{title:"Type of font",description:"The type of font. Can be a font stack, a theme font or a Google font"}),family:e.String({title:"Family",description:"The font family (eg. the name of the font)"})},{title:"Headings font",description:"Used for titles and headings",additionalProperties:!1}),d=e.Object({type:a(["stack","theme","google"],{title:"Type of font",description:"The type of font. Can be a font stack, a theme font or a Google font"}),family:e.String({title:"Family",description:"The font family (eg. the name of the font)"})},{title:"Body font",description:"Used for paragraphs and body text",additionalProperties:!1}),p=e.Object({id:e.String({title:"ID",description:"The unique identifier of the theme"}),name:e.String({title:"Name",description:"The name of the theme"}),description:e.String({title:"Description",description:"The description of the theme"}),tags:e.Array(e.String({title:"Tag"}),{title:"Tags",description:"The tags of the theme"}),browserColorScheme:a(["light","dark"],{title:"Browser scheme",description:"Color of browser-provided UI. Either 'light' or 'dark'"}),colors:e.Object({primary:e.String({title:"Primary",description:"The brand's primary color.","ai:instructions":"Use oklch() css notation.",examples:["oklch(0.62 0.241 354.308)"]}),secondary:e.String({title:"Secondary",description:"The brand's second most used color","ai:instructions":"Use oklch() css notation.",examples:["oklch(0.65 0.22 185)"]}),accent:e.String({title:"Accent",description:"The brand's least used color","ai:instructions":"Use oklch() css notation.",examples:["oklch(0.82 0.18 85)"]}),neutral:e.String({title:"Neutral",description:"The base neutral color","ai:instructions":"Use oklch() css notation.",examples:["oklch(0.38 0.08 280)"]}),base100:e.String({title:"Base",description:"Base surface color of page, used for blank backgrounds. Should be white or near-white for light color-schemes, and black or near-black for dark color-schemes.","ai:instructions":"Use oklab() css notation.",examples:["oklch(0.99 0.008 92)"]}),base200:e.String({title:"Base 2",description:"Should be darker than base 100 but still light for light color-schemes, and lighter but still dark for dark color-schemes.","ai:instructions":"Use oklab() css notation.",examples:["oklch(0.97 0.01 85)"]}),base300:e.String({title:"Base 3",description:"3rd base color, should be darker than base 200 for light color-schemes, and lighter than base 200 for dark color-schemes.","ai:instructions":"Use oklab() css notation.",examples:["oklch(0.95 0.02 80)"]})},{title:"Theme base colors",description:"The base colors of the theme. Each theme must declare all these colors",additionalProperties:!1}),typography:e.Object({base:e.Number({title:"Base font size",description:"The base font size in pixels. It is safe to keep it as is.","ai:instructions":"A safe value is 16."}),heading:h,body:d,alternatives:e.Array(e.Object({body:d,heading:h},{additionalProperties:!1}),{title:"Alternative fonts",description:"Alternative fonts that can be suggested to the user. Takes the same shape"})},{additionalProperties:!1})},{additionalProperties:!1}),f=e.Array(p);function x(){return l(f)}var u={id:"_default_",name:"default",description:"Default Upstart theme",tags:["gradient","vibrant","modern","creative","dynamic","artistic","bold"],browserColorScheme:"light",colors:{base100:"#FFF",base200:"#F5F0E1",base300:"#F0E3D2",primary:"#FF6F20",secondary:"#00BFFF",accent:"#A4D65E",neutral:"#B0B0B0"},typography:{base:16,heading:{type:"stack",family:"system-ui"},body:{type:"stack",family:"system-ui"},alternatives:[]}};function F(t){return t.id===u.id}function A(t){return{...t,typography:{...t.typography,base:16},colors:Object.entries(t.colors).reduce((s,[r,o])=>{let i=b(o);return{...s,[r]:i}},{})}}function b(t){if(c.valid(t))return t;if(/ok(lch|lab)\(([^)]+)\)/.test(t)){let o=t.replace(/,/g," ");if(c.valid(o))return o}if(/^([a-z]+)-([0-9]+)$/.test(t)){let[o,i]=t.split("-"),n=m[o]?.[i];if(n)return n}return t}export{v as a,p as b,f as c,x as d,u as e,F as f,A as g};
|
|
4
|
-
//# sourceMappingURL=chunk-A3K4NUVP.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/shared/theme.ts"],"sourcesContent":["import { Type, type Static } from \"@sinclair/typebox\";\nimport chroma from \"chroma-js\";\nimport { colorPalette } from \"@upstart.gg/style-system/colors\";\nimport { StringEnum } from \"./utils/string-enum\";\nimport { toLLMSchema } from \"./utils/llm\";\n\nexport const fontStacks = [\n { value: \"system-ui\", label: \"System UI\" },\n { value: \"transitional\", label: \"Transitional\" },\n { value: \"old-style\", label: \"Old style\" },\n { value: \"humanist\", label: \"Humanist\" },\n { value: \"geometric-humanist\", label: \"Geometric humanist\" },\n { value: \"classical-humanist\", label: \"Classical humanist\" },\n { value: \"neo-grotesque\", label: \"Neo-grotesque\" },\n { value: \"monospace-slab-serif\", label: \"Monospace slab serif\" },\n { value: \"monospace-code\", label: \"Monospace code\" },\n { value: \"industrial\", label: \"Industrial\" },\n { value: \"rounded-sans\", label: \"Rounded sans\" },\n { value: \"slab-serif\", label: \"Slab serif\" },\n { value: \"antique\", label: \"Antique\" },\n { value: \"didone\", label: \"Didone\" },\n { value: \"handwritten\", label: \"Handwritten\" },\n];\n\nconst headingFont = Type.Object(\n {\n type: StringEnum([\"stack\", \"theme\", \"google\"], {\n title: \"Type of font\",\n description: \"The type of font. Can be a font stack, a theme font or a Google font\",\n }),\n family: Type.String({\n title: \"Family\",\n description: \"The font family (eg. the name of the font)\",\n }),\n },\n {\n title: \"Headings font\",\n description: \"Used for titles and headings\",\n additionalProperties: false,\n },\n);\n\nconst bodyFont = Type.Object(\n {\n type: StringEnum([\"stack\", \"theme\", \"google\"], {\n title: \"Type of font\",\n description: \"The type of font. Can be a font stack, a theme font or a Google font\",\n }),\n family: Type.String({\n title: \"Family\",\n description: \"The font family (eg. the name of the font)\",\n }),\n },\n {\n title: \"Body font\",\n description: \"Used for paragraphs and body text\",\n additionalProperties: false,\n },\n);\n\nexport const themeSchema = Type.Object(\n {\n id: Type.String({ title: \"ID\", description: \"The unique identifier of the theme\" }),\n name: Type.String({ title: \"Name\", description: \"The name of the theme\" }),\n description: Type.String({ title: \"Description\", description: \"The description of the theme\" }),\n tags: Type.Array(Type.String({ title: \"Tag\" }), { title: \"Tags\", description: \"The tags of the theme\" }),\n browserColorScheme: StringEnum([\"light\", \"dark\"], {\n title: \"Browser scheme\",\n description: \"Color of browser-provided UI. Either 'light' or 'dark'\",\n }),\n // Define the theme colors\n colors: Type.Object(\n {\n primary: Type.String({\n title: \"Primary\",\n description: \"The brand's primary color.\",\n \"ai:instructions\": \"Use oklch() css notation.\",\n examples: [\"oklch(0.62 0.241 354.308)\"],\n }),\n secondary: Type.String({\n title: \"Secondary\",\n description: \"The brand's second most used color\",\n \"ai:instructions\": \"Use oklch() css notation.\",\n examples: [\"oklch(0.65 0.22 185)\"],\n }),\n accent: Type.String({\n title: \"Accent\",\n description: \"The brand's least used color\",\n \"ai:instructions\": \"Use oklch() css notation.\",\n examples: [\"oklch(0.82 0.18 85)\"],\n }),\n neutral: Type.String({\n title: \"Neutral\",\n description: \"The base neutral color\",\n \"ai:instructions\": \"Use oklch() css notation.\",\n examples: [\"oklch(0.38 0.08 280)\"],\n }),\n base100: Type.String({\n title: \"Base\",\n description:\n \"Base surface color of page, used for blank backgrounds. Should be white or near-white for light color-schemes, and black or near-black for dark color-schemes.\",\n \"ai:instructions\": \"Use oklab() css notation.\",\n examples: [\"oklch(0.99 0.008 92)\"],\n }),\n base200: Type.String({\n title: \"Base 2\",\n description:\n \"Should be darker than base 100 but still light for light color-schemes, and lighter but still dark for dark color-schemes.\",\n \"ai:instructions\": \"Use oklab() css notation.\",\n examples: [\"oklch(0.97 0.01 85)\"],\n }),\n base300: Type.String({\n title: \"Base 3\",\n description:\n \"3rd base color, should be darker than base 200 for light color-schemes, and lighter than base 200 for dark color-schemes.\",\n \"ai:instructions\": \"Use oklab() css notation.\",\n examples: [\"oklch(0.95 0.02 80)\"],\n }),\n },\n {\n title: \"Theme base colors\",\n description: \"The base colors of the theme. Each theme must declare all these colors\",\n additionalProperties: false,\n },\n ),\n\n // Define the theme typography\n typography: Type.Object(\n {\n base: Type.Number({\n title: \"Base font size\",\n description: \"The base font size in pixels. It is safe to keep it as is.\",\n \"ai:instructions\": \"A safe value is 16.\",\n }),\n heading: headingFont,\n body: bodyFont,\n alternatives: Type.Array(\n Type.Object(\n {\n body: bodyFont,\n heading: headingFont,\n },\n { additionalProperties: false },\n ),\n {\n title: \"Alternative fonts\",\n description: \"Alternative fonts that can be suggested to the user. Takes the same shape\",\n },\n ),\n },\n { additionalProperties: false },\n ),\n },\n {\n additionalProperties: false,\n },\n);\n\nexport type Theme = Static<typeof themeSchema>;\nexport const themesArray = Type.Array(themeSchema);\n\nexport function getThemesArrayForLLM() {\n return toLLMSchema(themesArray);\n}\n\nexport type ThemesArray = Static<typeof themesArray>;\nexport type FontType = Theme[\"typography\"][\"body\"];\n\nexport const defaultTheme: Theme = {\n id: \"_default_\",\n name: \"default\",\n description: \"Default Upstart theme\",\n tags: [\"gradient\", \"vibrant\", \"modern\", \"creative\", \"dynamic\", \"artistic\", \"bold\"],\n browserColorScheme: \"light\",\n colors: {\n base100: \"#FFF\", // Warm white background\n base200: \"#F5F0E1\", // Soft cream in hex\n base300: \"#F0E3D2\", // Light warm gray in hex\n primary: \"#FF6F20\", // A vibrant orange in hex\n secondary: \"#00BFFF\", // A bright cyan in hex\n accent: \"#A4D65E\", // A lively lime green in hex\n neutral: \"#B0B0B0\", // A balanced gray in hex\n },\n typography: {\n base: 16,\n heading: { type: \"stack\", family: \"system-ui\" },\n body: { type: \"stack\", family: \"system-ui\" },\n alternatives: [],\n },\n};\n\nexport function isDefaultTheme(theme: Theme): boolean {\n return theme.id === defaultTheme.id;\n}\n\n/**\n * Process a theme, eventually fixing colors and translating them to oklch notations\n * @param theme\n */\nexport function processTheme(theme: Theme): Theme {\n return {\n ...theme,\n typography: {\n ...theme.typography,\n base: 16, // override any base size\n },\n colors: Object.entries(theme.colors).reduce(\n (acc, [key, value]) => {\n const fixedColor = fixOklchColor(value);\n return {\n // biome-ignore lint/performance/noAccumulatingSpread: <explanation>\n ...acc,\n [key]: fixedColor,\n };\n },\n {} as typeof theme.colors,\n ),\n };\n}\n\nfunction fixOklchColor(color: string) {\n const valid = chroma.valid(color);\n if (valid) {\n return color;\n }\n // Try to fix the color if it looks like oklch\n const oklchRegex = /ok(lch|lab)\\(([^)]+)\\)/;\n if (oklchRegex.test(color)) {\n const withoutComma = color.replace(/,/g, \" \");\n if (chroma.valid(withoutComma)) {\n return withoutComma;\n }\n }\n // tailwind colors\n if (/^([a-z]+)-([0-9]+)$/.test(color)) {\n const [name, shade] = color.split(\"-\");\n // @ts-ignore\n const twColor = colorPalette[name]?.[shade] as string | undefined;\n if (twColor) {\n return twColor;\n }\n }\n return color;\n}\n"],"mappings":";;2EAAA,OAAS,QAAAA,MAAyB,oBAClC,OAAOC,MAAY,YACnB,OAAS,gBAAAC,MAAoB,kCAItB,IAAMC,EAAa,CACxB,CAAE,MAAO,YAAa,MAAO,WAAY,EACzC,CAAE,MAAO,eAAgB,MAAO,cAAe,EAC/C,CAAE,MAAO,YAAa,MAAO,WAAY,EACzC,CAAE,MAAO,WAAY,MAAO,UAAW,EACvC,CAAE,MAAO,qBAAsB,MAAO,oBAAqB,EAC3D,CAAE,MAA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I,YACJ,KAAM,UACN,YAAa,wBACb,KAAM,CAAC,WAAY,UAAW,SAAU,WAAY,UAAW,WAAY,MAAM,EACjF,mBAAoB,QACpB,OAAQ,CACN,QAAS,OACT,QAAS,UACT,QAAS,UACT,QAAS,UACT,UAAW,UACX,OAAQ,UACR,QAAS,SACX,EACA,WAAY,CACV,KAAM,GACN,QAAS,CAAE,KAAM,QAAS,OAAQ,WAAY,EAC9C,KAAM,CAAE,KAAM,QAAS,OAAQ,WAAY,EAC3C,aAAc,CAAC,CACjB,CACF,EAEO,SAASC,EAAeC,EAAuB,CACpD,OAAOA,EAAM,KAAOF,EAAa,EACnC,CAMO,SAASG,EAAaD,EAAqB,CAChD,MAAO,CACL,GAAGA,EACH,WAAY,CACV,GAAGA,EAAM,WACT,KAAM,EACR,EACA,OAAQ,OAAO,QAAQA,EAAM,MAAM,EAAE,OACnC,CAACE,EAAK,CAACC,EAAKC,CAAK,IAAM,CACrB,IAAMC,EAAaC,EAAcF,CAAK,EACtC,MAAO,CAEL,GAAGF,EACH,CAACC,CAAG,EAAGE,CACT,CACF,EACA,CAAC,CACH,CACF,CACF,CAEA,SAASC,EAAcC,EAAe,CAEpC,GADcC,EAAO,MAAMD,CAAK,EAE9B,OAAOA,EAIT,GADmB,yBACJ,KAAKA,CAAK,EAAG,CAC1B,IAAME,EAAeF,EAAM,QAAQ,KAAM,GAAG,EAC5C,GAAIC,EAAO,MAAMC,CAAY,EAC3B,OAAOA,CAEX,CAEA,GAAI,sBAAsB,KAAKF,CAAK,EAAG,CACrC,GAAM,CAACG,EAAMC,CAAK,EAAIJ,EAAM,MAAM,GAAG,EAE/BK,EAAUC,EAAaH,CAAI,IAAIC,CAAK,EAC1C,GAAIC,EACF,OAAOA,CAEX,CACA,OAAOL,CACT","names":["Type","chroma","colorPalette","fontStacks","headingFont","Type","StringEnum","bodyFont","themeSchema","themesArray","getThemesArrayForLLM","toLLMSchema","defaultTheme","isDefaultTheme","theme","processTheme","acc","key","value","fixedColor","fixOklchColor","color","chroma","withoutComma","name","shade","twColor","colorPalette"]}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
-
|
|
3
|
-
import{a as J}from"./chunk-CCI4C3TM.js";import{c as N,e as E}from"./chunk-A3GF4PYW.js";import{a as K}from"./chunk-QWGUMKZC.js";import{a as P,e as W}from"./chunk-5YRC3IT3.js";import{a as B}from"./chunk-GACHLACT.js";import{a as _,c as C}from"./chunk-4BTB3MU2.js";import{a as $,c as j}from"./chunk-DHI3IBOD.js";import{a as F,c as k}from"./chunk-ZTZJHY4E.js";import{b as M}from"./chunk-CZRCW5EN.js";import{a as I,c as D}from"./chunk-NM5MMPCF.js";import{a as R}from"./chunk-W33JMRRN.js";import{a as A,c as w,e as T}from"./chunk-SWLUQVK7.js";import{b as U}from"./chunk-OHNYCXPX.js";import{a as L}from"./chunk-KFM6KXSE.js";import{a as q}from"./chunk-JMN3HTZU.js";import ne from"ajv";import le from"ajv-formats";import{Type as y}from"@sinclair/typebox";import{Type as e}from"@sinclair/typebox";var he=e.Union([e.Literal("internal")]),H=e.Object({id:e.String({title:"ID",description:"Unique identifier of the datasource. Used to reference the datasource in the system. Use a url-safe string like a slug."}),label:e.String({title:"Label",description:"Label of the datasource displayed in the UI"}),provider:e.Literal("internal",{title:"Internal",description:"Internal datasource saved locally in Upstart."}),schema:e.Any({title:"Schema",description:"JSON Schema of datasource. MUST Always an array of objects."}),indexes:e.Optional(e.Array(e.Object({name:e.String({title:"Index name"}),fields:e.Array(e.String(),{title:"Fields to index"}),unique:e.Optional(e.Boolean({title:"Unique index",default:!1}))}),{title:"Indexes",description:"IMPORTANT: Indexes to create on the datasource. use it to enforce uniqueness or improve query performance."}))},{examples:[{id:"customers",label:"Customers",provider:"internal",schema:{type:"array",items:{type:"object",properties:{name:{type:"string",title:"Name"},email:{type:"string",title:"Email",format:"email"}},required:["name","email"],title:"Customer",examples:[{name:"John Doe",email:"john.doe@example.com"},{name:"Jane Smith",email:"jane.smith@example.com"},{name:"Alice Johnson",email:"alice.johnson@example.com"},{name:"Bob Brown",email:"bob.brown@example.com"},{name:"Charlie Davis",email:"charlie.davis@example.com"}]}},indexes:[{name:"idx_customers_email",fields:["email"],unique:!0}]},{id:"blog_posts",label:"Blog Posts",provider:"internal",schema:{type:"array",items:{type:"object",properties:{title:{type:"string",title:"Title"},content:{type:"string",title:"Content"},author:{type:"string",title:"Author"}},required:["title","content","author"],title:"Blog Post",examples:[{title:"My First Blog Post",content:"This is the content of my first blog post.",author:"John Doe"},{title:"Exploring the Cosmos",content:"A journey through the stars and galaxies.",author:"Jane Smith"},{title:"The Art of Cooking",content:"Delicious recipes and cooking tips.",author:"Alice Johnson"},{title:"Traveling the World",content:"My adventures in different countries.",author:"Bob Brown"},{title:"Technology Trends",content:"The latest trends in technology.",author:"Charlie Davis"}]}},indexes:[{name:"idx_blog_posts_title",fields:["title"],unique:!0}]}]}),Q=H;function ye(){return z(Q)}var ge=e.Array(Q),X=e.Object({field:e.String(),op:e.Union([e.Literal("eq"),e.Literal("ne"),e.Literal("contains"),e.Literal("notContains"),e.Literal("startsWith"),e.Literal("notStartsWith"),e.Literal("endsWith"),e.Literal("notEndsWith")]),value:e.String()}),ee=e.Object({field:e.String(),op:e.Union([e.Literal("eq"),e.Literal("ne"),e.Literal("lt"),e.Literal("lte"),e.Literal("gt"),e.Literal("gte")]),value:e.Number()}),te=e.Object({field:e.String(),op:e.Union([e.Literal("before"),e.Literal("after")]),value:e.String()}),re=e.Object({field:e.String(),op:e.Union([e.Literal("beforeNow"),e.Literal("afterNow")]),value:e.Null()}),ie=e.Object({field:e.String(),op:e.Union([e.Literal("contains"),e.Literal("notContains"),e.Literal("containsAll"),e.Literal("containsAny"),e.Literal("notContainsAny")]),value:e.Array(e.String())}),oe=e.Object({field:e.String(),op:e.Literal("eq"),value:e.Boolean()}),S=e.Union([X,ee,te,re,ie,oe]),ae=e.Recursive(t=>e.Union([e.Object({op:e.Literal("and"),fields:e.Array(e.Union([S,t]),{title:"Indexed Fields"})}),e.Object({op:e.Literal("or"),fields:e.Array(e.Union([S,t]))})],{default:{op:"and",fields:[]},examples:[{op:"and",fields:[{field:"$id",op:"eq",value:"123"},{field:"$publicationDate",op:"beforeNow"}]}]}),{title:"Filter Expression",description:"Expression used to filter query results. Can be a combination of and/or conditions."}),Se=e.Object({id:e.String({title:"Query ID",description:"Unique identifier for the query. Used to reference the query in the system. URL-safe string like a slug."}),label:e.String({title:"Label",maxLength:100,description:"Label of the query displayed in the UI"}),datasourceId:e.String({title:"Database",description:"ID of the datasource to query"}),limit:e.Number({title:"Limit",description:"Limit the number of records to fetch from the datasource.",minimum:1,default:10}),sortDirection:e.Optional(q(["asc","desc"],{title:"Sort",enumNames:["Ascending","Descending"],description:"Direction to sort the records by",default:"desc"})),sortField:e.Optional(e.String({title:"Sort Field",description:"Field to sort by (must be an indexed field)",default:"$publicationDate"})),filters:e.Optional(ae),parameters:e.Optional(e.Array(e.Object({field:e.String({title:"Field",description:"Field name to use as parameter"}),op:e.Union([e.Literal("eq"),e.Literal("ne"),e.Literal("contains"),e.Literal("notContains"),e.Literal("startsWith"),e.Literal("notStartsWith"),e.Literal("endsWith"),e.Literal("notEndsWith"),e.Literal("lt"),e.Literal("lte"),e.Literal("gt"),e.Literal("gte"),e.Literal("before"),e.Literal("after"),e.Literal("beforeNow"),e.Literal("afterNow"),e.Literal("containsAll"),e.Literal("containsAny"),e.Literal("notContainsAny")],{title:"Operator",description:"Operator to use for the parameter"})}),{title:"Parameters",description:"Field name and operator that will be used as parameters when using the query in pages. Only indexed fields can be used as parameters.",default:[],examples:[[{field:"$slug",op:"eq"}],[{field:"category",op:"eq"}],[{field:"tags",op:"containsAny"}],[{field:"author",op:"eq"}],[{field:"title",op:"contains"}]]}))},{examples:[{id:"latest-posts",label:"Latest posts",datasourceId:"blog_posts",limit:5,sortDirection:"desc",sortField:"$publicationDate"},{id:"posts-by-category",label:"Posts by category",datasourceId:"blog_posts",limit:10,sortDirection:"desc",sortField:"$publicationDate",parameters:[{field:"category",op:"eq"}]},{id:"posts-by-tag",label:"Posts by tag",datasourceId:"blog_posts",limit:10,sortDirection:"desc",sortField:"$publicationDate",parameters:[{field:"tags",op:"containsAny"}]},{id:"author-posts",label:"Author posts",datasourceId:"blog_posts",limit:10,sortDirection:"desc",sortField:"$publicationDate",parameters:[{field:"author",op:"eq"}]},{id:"search-posts",label:"Search posts",datasourceId:"blog_posts",limit:10,sortDirection:"desc",sortField:"$publicationDate",parameters:[{field:"title",op:"contains"}]}]});function Z(){return y.Object({queryId:y.String({description:"The Site Query ID to use."}),alias:y.String({title:"Alias",minLength:1,maxLength:100,pattern:"^[a-zA-Z0-9_]+$",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.","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."}),params:y.Optional(y.Array(S,{description:"Additional query parameters/filters to apply to the query. One can use placeholders in values like ':slug' to reference URL parameters.",title:"Query Parameters",default:[]}))},{title:"Query",description:"When set, this brick will loop through the results of the query and render the content for each item.","ui:field":"query",metadata:{category:"content"},examples:[{queryId:"get-latest-posts",alias:"latestPosts"},{queryId:"get-user-profile",alias:"userProfile",params:[{field:"userId",op:"eq",value:":slug"}]},{queryId:"get-posts-by-category",alias:"postsByCategory",params:[{field:"category",op:"eq",value:":slug"}]}]})}var Oe=se();function se(t={}){return L("content:queryUse",t)}function V(t={}){return y.Object({over:y.String({title:"Over",description:"The query alias to loop over. If not set, the brick will be rendered only once.","ai:instructions":"Specify the Query Alias to loop over the results."}),overrideLimit:y.Optional(y.Number({minimum:1,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."}))},{title:"Repeat over",description:"Repeat this brick for each item in the specified query results.","ui:field":"loop","ui:hidden-if":"no-page-queries",metadata:{category:"content"},examples:[{over:"latestBlogPosts",overrideLimit:5},{over:"featuredProducts",overrideLimit:3},{over:"popularProducts"}],...t})}function qe(t={}){return L("content:loop",t)}var ce=["date-time","date","email","url"];function x(){let t=new ne({useDefaults:!0,strictSchema:!1,validateSchema:!1,coerceTypes:!0,allErrors:!0,inlineRefs:!0});return t.addSchema($(),"styles:background"),t.addSchema(j(),"styles:backgroundColor"),t.addSchema(A(),"styles:justifyContent"),t.addSchema(w(),"styles:alignItems"),t.addSchema(T(),"styles:alignSelf"),t.addSchema(k(),"styles:rounding"),t.addSchema(P(),"styles:fontSize"),t.addSchema(R(),"styles:hidden"),t.addSchema(B(),"styles:direction"),t.addSchema(F(),"styles:border"),t.addSchema(I(),"styles:color"),t.addSchema(D(),"styles:borderColor"),t.addSchema(_(),"styles:shadow"),t.addSchema(C(),"styles:textShadow"),t.addSchema(U(),"styles:cssLength"),t.addSchema(J(),"assets:image"),t.addSchema(E(),"assets:icon"),t.addSchema(W(),"content:text"),t.addSchema(N(),"content:urlOrPageId"),t.addSchema(V(),"content:loop"),t.addSchema(Z(),"content:queryUse"),t.addSchema(M(),"presets:color"),t.addSchema(K(),"content:tags"),le(t,[...ce]),t.addFormat("slug",{validate:r=>typeof r=="string",async:!1,type:"string"}),t.addFormat("image",{validate:r=>typeof r=="string",async:!1,type:"string"}),t.addFormat("file",{validate:r=>typeof r=="string",async:!1,type:"string"}),t.addFormat("nanoid",{validate:r=>typeof r=="string",async:!1,type:"string"}),t.addFormat("richtext",{validate:r=>typeof r=="string",async:!1,type:"string"}),t.addFormat("markdown",{validate:r=>typeof r=="string",async:!1,type:"string"}),t.addFormat("multiline",{validate:r=>typeof r=="string",async:!1,type:"string"}),t.addFormat("password",{validate:r=>typeof r=="string",async:!1,type:"string"}),t}var Me=x();function Je(t){return!t||t.length===0?"Unknown validation error":t.map(r=>{let{instancePath:i,message:l,params:s}=r,h=i||"root",c=Object.entries(s||{}).map(([u,v])=>`${u}: ${v}`).join(", ");return`${h} ${l} (${c})`}).join("; ")}import{cloneDeep as de}from"lodash-es";function z(t,r){return b(pe(t,r??x()))}function b(t){let r={};for(let[i,l]of Object.entries(t))if(!(i==="metadata"||i.startsWith("ui:")))if(l&&typeof l=="object")if(Array.isArray(l))r[i]=l.map(s=>s&&typeof s=="object"&&Y(s)?b(s):s);else if(Y(l))r[i]=b(l);else if(i==="properties"||i==="definitions"||i==="$defs"||i==="patternProperties"){let s={};for(let[h,c]of Object.entries(l))if(c&&typeof c=="object"){if(c["ai:hidden"]===!0)continue;s[h]=b(c)}else s[h]=c;r[i]=s}else r[i]=l;else r[i]=l;return r}function Y(t){return!t||typeof t!="object"?!1:["type","$ref","properties","items","anyOf","oneOf","allOf","not","if","then","else"].some(i=>i in t)}function pe(t,r){let i=de(t),l=new Set;i.$defs||(i.$defs={});function s(o){if(!(typeof o!="object"||o===null)){if(Array.isArray(o)){o.forEach(s);return}for(let[d,a]of Object.entries(o))d==="$ref"&&typeof a=="string"?a.startsWith("#/")||l.add(a):s(a)}}function h(o,d){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return o.map(n=>h(n,d));let a={};for(let[n,p]of Object.entries(o))if(n==="$ref"&&typeof p=="string"){let m=d.get(p);a[n]=m||p}else a[n]=h(p,d);return a}s(i);let c=new Map;for(let o of l){let d=r.getSchema(o);if(!d?.schema)continue;let a=o.replace(/[^a-zA-Z0-9_-]/g,"_").replace(/^_+|_+$/g,"")||o.split("/").pop()?.replace(/[^a-zA-Z0-9_-]/g,"_")||`ref_${Object.keys(i.$defs).length}`,n=a,p=1;for(;i.$defs[n];)n=`${a}_${p}`,p++;let{$id:m,...f}=d.schema;i.$defs[n]=f,c.set(o,`#/$defs/${n}`)}let u=h(i,c);if(u.$defs){let o=!0;for(;o;){o=!1;let d=new Set;for(let[a,n]of Object.entries(u.$defs)){let m=function(f){if(!(typeof f!="object"||f===null)){if(Array.isArray(f)){f.forEach(m);return}for(let[G,g]of Object.entries(f))if(G==="$ref"&&typeof g=="string"){let O=(g.startsWith("#/"),g);O.startsWith("#/")||p.add(O)}else m(g)}};var v=m;let p=new Set;m(n);for(let f of p)c.has(f)||(d.add(f),o=!0)}for(let a of d){let n=r.getSchema(a);if(n?.schema){let p=a.replace(/[^a-zA-Z0-9_-]/g,"_").replace(/^_+|_+$/g,"")||`ref_${Object.keys(u.$defs).length}`,m=p,f=1;for(;u.$defs[m];)m=`${p}_${f}`,f++;u.$defs[m]=n.schema,c.set(a,`#/$defs/${m}`)}}}for(let[d,a]of Object.entries(u.$defs))u.$defs[d]=h(a,c)}return u}export{z as a,pe as b,he as c,Q as d,ye as e,ge as f,S as g,Se as h,Z as i,Oe as j,se as k,V as l,qe as m,ce as n,x as o,Me as p,Je as q};
|
|
4
|
-
//# sourceMappingURL=chunk-AFVJZPLS.js.map
|