@upstart.gg/sdk 0.0.132 → 0.0.134
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.js +1 -0
- package/dist/shared/ai/schemas.js.map +1 -0
- package/dist/shared/ai/types.js +1 -0
- package/dist/shared/ai/types.js.map +1 -0
- package/dist/shared/ajv.js +2 -1
- package/dist/shared/ajv.js.map +1 -0
- package/dist/shared/analytics/init.js +1 -0
- package/dist/shared/analytics/init.js.map +1 -0
- package/dist/shared/analytics/track.js +1 -0
- package/dist/shared/analytics/track.js.map +1 -0
- package/dist/shared/analytics/types.js +1 -0
- package/dist/shared/analytics/types.js.map +1 -0
- package/dist/shared/attributes.js +2 -1
- package/dist/shared/attributes.js.map +1 -0
- package/dist/shared/brick-manifest.js +2 -1
- package/dist/shared/brick-manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/accordion.manifest.js +2 -1
- package/dist/shared/bricks/manifests/accordion.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/all-manifests.js +2 -1
- package/dist/shared/bricks/manifests/all-manifests.js.map +1 -0
- package/dist/shared/bricks/manifests/box.manifest.js +2 -1
- package/dist/shared/bricks/manifests/box.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/button.manifest.js +2 -1
- package/dist/shared/bricks/manifests/button.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/card.manifest.js +2 -1
- package/dist/shared/bricks/manifests/card.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/carousel.manifest.js +2 -1
- package/dist/shared/bricks/manifests/carousel.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/footer.manifest.js +2 -1
- package/dist/shared/bricks/manifests/footer.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/form.manifest.js +2 -1
- package/dist/shared/bricks/manifests/form.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/hero.manifest.js +2 -1
- package/dist/shared/bricks/manifests/hero.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/html.manifest.js +2 -1
- package/dist/shared/bricks/manifests/html.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/icon.manifest.js +2 -1
- package/dist/shared/bricks/manifests/icon.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/image.manifest.js +2 -1
- package/dist/shared/bricks/manifests/image.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/images-gallery.manifest.js +2 -1
- package/dist/shared/bricks/manifests/images-gallery.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/map.manifest.js +2 -1
- package/dist/shared/bricks/manifests/map.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/navbar.manifest.js +2 -1
- package/dist/shared/bricks/manifests/navbar.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/sidebar.manifest.js +2 -1
- package/dist/shared/bricks/manifests/sidebar.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/social-links.manifest.js +2 -1
- package/dist/shared/bricks/manifests/social-links.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/spacer.manifest.js +2 -1
- package/dist/shared/bricks/manifests/spacer.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/testimonials.manifest.js +2 -1
- package/dist/shared/bricks/manifests/testimonials.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/text.manifest.js +2 -1
- package/dist/shared/bricks/manifests/text.manifest.js.map +1 -0
- package/dist/shared/bricks/manifests/video.manifest.js +2 -1
- package/dist/shared/bricks/manifests/video.manifest.js.map +1 -0
- package/dist/shared/bricks/props/align.js +2 -1
- package/dist/shared/bricks/props/align.js.map +1 -0
- package/dist/shared/bricks/props/background.js +2 -1
- package/dist/shared/bricks/props/background.js.map +1 -0
- package/dist/shared/bricks/props/boolean.js +2 -1
- package/dist/shared/bricks/props/boolean.js.map +1 -0
- package/dist/shared/bricks/props/border.js +2 -1
- package/dist/shared/bricks/props/border.js.map +1 -0
- package/dist/shared/bricks/props/color-preset.js +2 -1
- package/dist/shared/bricks/props/color-preset.js.map +1 -0
- package/dist/shared/bricks/props/color.js +2 -1
- package/dist/shared/bricks/props/color.js.map +1 -0
- package/dist/shared/bricks/props/common.js +2 -1
- package/dist/shared/bricks/props/common.js.map +1 -0
- package/dist/shared/bricks/props/css-length.js +2 -1
- package/dist/shared/bricks/props/css-length.js.map +1 -0
- package/dist/shared/bricks/props/datarecord.js +2 -1
- package/dist/shared/bricks/props/datarecord.js.map +1 -0
- package/dist/shared/bricks/props/datasource.js +2 -1
- package/dist/shared/bricks/props/datasource.js.map +1 -0
- package/dist/shared/bricks/props/date.js +2 -1
- package/dist/shared/bricks/props/date.js.map +1 -0
- package/dist/shared/bricks/props/direction.js +2 -1
- package/dist/shared/bricks/props/direction.js.map +1 -0
- package/dist/shared/bricks/props/dynamic.js +2 -1
- package/dist/shared/bricks/props/dynamic.js.map +1 -0
- package/dist/shared/bricks/props/effects.js +2 -1
- package/dist/shared/bricks/props/effects.js.map +1 -0
- package/dist/shared/bricks/props/enum.js +2 -1
- package/dist/shared/bricks/props/enum.js.map +1 -0
- package/dist/shared/bricks/props/file.js +1 -0
- package/dist/shared/bricks/props/file.js.map +1 -0
- package/dist/shared/bricks/props/geolocation.js +2 -1
- package/dist/shared/bricks/props/geolocation.js.map +1 -0
- package/dist/shared/bricks/props/helpers.js +2 -1
- package/dist/shared/bricks/props/helpers.js.map +1 -0
- package/dist/shared/bricks/props/image.js +2 -1
- package/dist/shared/bricks/props/image.js.map +1 -0
- package/dist/shared/bricks/props/number.js +2 -1
- package/dist/shared/bricks/props/number.js.map +1 -0
- package/dist/shared/bricks/props/position.js +2 -1
- package/dist/shared/bricks/props/position.js.map +1 -0
- package/dist/shared/bricks/props/string.js +2 -1
- package/dist/shared/bricks/props/string.js.map +1 -0
- package/dist/shared/bricks/props/tags.js +2 -1
- package/dist/shared/bricks/props/tags.js.map +1 -0
- package/dist/shared/bricks/props/text.js +2 -1
- package/dist/shared/bricks/props/text.js.map +1 -0
- package/dist/shared/bricks/props/types.js +1 -0
- package/dist/shared/bricks/props/types.js.map +1 -0
- package/dist/shared/bricks.js +2 -1
- package/dist/shared/bricks.js.map +1 -0
- package/dist/shared/{chunk-6PGAWO4H.js → chunk-3YVJ2ELD.js} +2 -1
- package/dist/shared/chunk-3YVJ2ELD.js.map +1 -0
- package/dist/shared/{chunk-AB3IMRXZ.js → chunk-4BTB3MU2.js} +2 -1
- package/dist/shared/chunk-4BTB3MU2.js.map +1 -0
- package/dist/shared/{chunk-ZJNA4QQC.js → chunk-4WDWJA3N.js} +1 -0
- package/dist/shared/chunk-4WDWJA3N.js.map +1 -0
- package/dist/shared/{chunk-NQKXDMQ5.js → chunk-5O4Z3YQY.js} +1 -0
- package/dist/shared/chunk-5O4Z3YQY.js.map +1 -0
- package/dist/shared/{chunk-VK26ZZFR.js → chunk-5YRC3IT3.js} +2 -1
- package/dist/shared/chunk-5YRC3IT3.js.map +1 -0
- package/dist/shared/{chunk-WAML3IGZ.js → chunk-6HLU4UI2.js} +1 -0
- package/dist/shared/chunk-6HLU4UI2.js.map +1 -0
- package/dist/shared/{chunk-MKIXZXWS.js → chunk-6I3ONVU6.js} +1 -0
- package/dist/shared/chunk-6I3ONVU6.js.map +1 -0
- package/dist/shared/{chunk-AZHH3XJJ.js → chunk-7A2JNQX3.js} +2 -1
- package/dist/shared/chunk-7A2JNQX3.js.map +1 -0
- package/dist/shared/{chunk-7UBMXMNJ.js → chunk-A3GF4PYW.js} +2 -1
- package/dist/shared/chunk-A3GF4PYW.js.map +1 -0
- package/dist/shared/{chunk-46YDGGFF.js → chunk-A3K4NUVP.js} +2 -1
- package/dist/shared/chunk-A3K4NUVP.js.map +1 -0
- package/dist/shared/{chunk-F4JNKU7J.js → chunk-AFVJZPLS.js} +2 -1
- package/dist/shared/chunk-AFVJZPLS.js.map +1 -0
- package/dist/shared/{chunk-PW5HRVMD.js → chunk-AI4GHU7R.js} +2 -1
- package/dist/shared/chunk-AI4GHU7R.js.map +1 -0
- package/dist/shared/{chunk-SAJY7H6N.js → chunk-B3EATRFX.js} +2 -1
- package/dist/shared/chunk-B3EATRFX.js.map +1 -0
- package/dist/shared/{chunk-3FPFR5RA.js → chunk-CCI4C3TM.js} +2 -1
- package/dist/shared/chunk-CCI4C3TM.js.map +1 -0
- package/dist/shared/{chunk-URRCKLAS.js → chunk-CFF6Q7O7.js} +2 -1
- package/dist/shared/chunk-CFF6Q7O7.js.map +1 -0
- package/dist/shared/{chunk-Z4YKRLOX.js → chunk-CZRCW5EN.js} +2 -1
- package/dist/shared/chunk-CZRCW5EN.js.map +1 -0
- package/dist/shared/{chunk-ARMM6B47.js → chunk-DCH4ZKWT.js} +1 -0
- package/dist/shared/chunk-DCH4ZKWT.js.map +1 -0
- package/dist/shared/{chunk-GC5OWY2Z.js → chunk-DHI3IBOD.js} +2 -1
- package/dist/shared/chunk-DHI3IBOD.js.map +1 -0
- package/dist/shared/{chunk-PZYX3ACO.js → chunk-DQ7PRWTG.js} +1 -0
- package/dist/shared/chunk-DQ7PRWTG.js.map +1 -0
- package/dist/shared/{chunk-XED6ARVN.js → chunk-E6XEI7IK.js} +2 -1
- package/dist/shared/chunk-E6XEI7IK.js.map +1 -0
- package/dist/shared/{chunk-6R76KIHZ.js → chunk-FLOMNC6J.js} +2 -1
- package/dist/shared/chunk-FLOMNC6J.js.map +1 -0
- package/dist/shared/{chunk-EVDZ2KND.js → chunk-G5CJU6RD.js} +2 -1
- package/dist/shared/chunk-G5CJU6RD.js.map +1 -0
- package/dist/shared/{chunk-MVCVVKBY.js → chunk-GACHLACT.js} +2 -1
- package/dist/shared/chunk-GACHLACT.js.map +1 -0
- package/dist/shared/{chunk-X62OEAE6.js → chunk-GLS7HPIZ.js} +1 -0
- package/dist/shared/chunk-GLS7HPIZ.js.map +1 -0
- package/dist/shared/{chunk-ML4JSDQM.js → chunk-GOMXZC4B.js} +2 -1
- package/dist/shared/chunk-GOMXZC4B.js.map +1 -0
- package/dist/shared/{chunk-L2HOZVBC.js → chunk-GPEMPZXK.js} +1 -0
- package/dist/shared/chunk-GPEMPZXK.js.map +1 -0
- package/dist/shared/{chunk-IFEIRRZ2.js → chunk-HAGKVQOW.js} +1 -0
- package/dist/shared/chunk-HAGKVQOW.js.map +1 -0
- package/dist/shared/{chunk-ILIWVWHC.js → chunk-I3VL6SRH.js} +2 -1
- package/dist/shared/chunk-I3VL6SRH.js.map +1 -0
- package/dist/shared/{chunk-2NLDX5FG.js → chunk-IKC3FK7L.js} +2 -1
- package/dist/shared/chunk-IKC3FK7L.js.map +1 -0
- package/dist/shared/{chunk-STDCM2KD.js → chunk-IKHZD2JH.js} +2 -1
- package/dist/shared/chunk-IKHZD2JH.js.map +1 -0
- package/dist/shared/{chunk-NKIEDT7V.js → chunk-IUXCWWGO.js} +1 -0
- package/dist/shared/chunk-IUXCWWGO.js.map +1 -0
- package/dist/shared/{chunk-SFKZAUPW.js → chunk-JMN3HTZU.js} +1 -0
- package/dist/shared/chunk-JMN3HTZU.js.map +1 -0
- package/dist/shared/{chunk-VLXZMESE.js → chunk-KBHDY425.js} +1 -0
- package/dist/shared/chunk-KBHDY425.js.map +1 -0
- package/dist/shared/{chunk-5WY7LYXK.js → chunk-KFM6KXSE.js} +1 -0
- package/dist/shared/chunk-KFM6KXSE.js.map +1 -0
- package/dist/shared/{chunk-7QFMCLUL.js → chunk-KLD3P5XH.js} +1 -0
- package/dist/shared/chunk-KLD3P5XH.js.map +1 -0
- package/dist/shared/{chunk-6L3Z5SZQ.js → chunk-KO5FPOWZ.js} +1 -0
- package/dist/shared/chunk-KO5FPOWZ.js.map +1 -0
- package/dist/shared/{chunk-YIFNKP4J.js → chunk-KSEURRVZ.js} +1 -0
- package/dist/shared/chunk-KSEURRVZ.js.map +1 -0
- package/dist/shared/{chunk-HP7CZB2F.js → chunk-KYY3PHP7.js} +1 -0
- package/dist/shared/chunk-KYY3PHP7.js.map +1 -0
- package/dist/shared/{chunk-ARYG4XMX.js → chunk-NJGXC7D6.js} +2 -1
- package/dist/shared/chunk-NJGXC7D6.js.map +1 -0
- package/dist/shared/{chunk-SFDRAHYP.js → chunk-NM5MMPCF.js} +2 -1
- package/dist/shared/chunk-NM5MMPCF.js.map +1 -0
- package/dist/shared/{chunk-XZLBM4AX.js → chunk-OGBMYMZD.js} +2 -1
- package/dist/shared/chunk-OGBMYMZD.js.map +1 -0
- package/dist/shared/{chunk-HSRXUIVM.js → chunk-OHNYCXPX.js} +2 -1
- package/dist/shared/chunk-OHNYCXPX.js.map +1 -0
- package/dist/shared/{chunk-MPBYGS6W.js → chunk-OIY3EPHO.js} +1 -0
- package/dist/shared/chunk-OIY3EPHO.js.map +1 -0
- package/dist/shared/{chunk-L42YBY5I.js → chunk-PIG623TZ.js} +1 -0
- package/dist/shared/chunk-PIG623TZ.js.map +1 -0
- package/dist/shared/{chunk-K5ADUHF4.js → chunk-PLSV746R.js} +2 -1
- package/dist/shared/chunk-PLSV746R.js.map +1 -0
- package/dist/shared/chunk-PSCN3VVA.js +4 -0
- package/dist/shared/chunk-PSCN3VVA.js.map +1 -0
- package/dist/shared/{chunk-3P36LG6T.js → chunk-PSTFJ5IJ.js} +2 -1
- package/dist/shared/chunk-PSTFJ5IJ.js.map +1 -0
- package/dist/shared/{chunk-TH5SONR6.js → chunk-PXI7AHWS.js} +2 -1
- package/dist/shared/chunk-PXI7AHWS.js.map +1 -0
- package/dist/shared/{chunk-AMQAGDFH.js → chunk-Q4H4QEMB.js} +1 -0
- package/dist/shared/chunk-Q4H4QEMB.js.map +1 -0
- package/dist/shared/{chunk-LEWKHCRI.js → chunk-QGYZ7CG5.js} +2 -1
- package/dist/shared/chunk-QGYZ7CG5.js.map +1 -0
- package/dist/shared/{chunk-US53TNMK.js → chunk-QWGUMKZC.js} +2 -1
- package/dist/shared/chunk-QWGUMKZC.js.map +1 -0
- package/dist/shared/{chunk-5X5SX5N7.js → chunk-QX6OGRRT.js} +2 -1
- package/dist/shared/chunk-QX6OGRRT.js.map +1 -0
- package/dist/shared/{chunk-VDX2J22H.js → chunk-R6ATC4TC.js} +2 -1
- package/dist/shared/chunk-R6ATC4TC.js.map +1 -0
- package/dist/shared/{chunk-WXKRIUTA.js → chunk-RDZK73KV.js} +1 -0
- package/dist/shared/chunk-RDZK73KV.js.map +1 -0
- package/dist/shared/{chunk-4GIZ6WSG.js → chunk-RJYZ5FAR.js} +2 -1
- package/dist/shared/chunk-RJYZ5FAR.js.map +1 -0
- package/dist/shared/{chunk-3QOAHMV4.js → chunk-SQ5T4AT5.js} +2 -1
- package/dist/shared/chunk-SQ5T4AT5.js.map +1 -0
- package/dist/shared/{chunk-DKNOZLA6.js → chunk-SWLUQVK7.js} +2 -1
- package/dist/shared/chunk-SWLUQVK7.js.map +1 -0
- package/dist/shared/{chunk-QGFQA7OZ.js → chunk-SXHDQ64Z.js} +2 -1
- package/dist/shared/chunk-SXHDQ64Z.js.map +1 -0
- package/dist/shared/{chunk-UDQWYGSO.js → chunk-SY6DZLTC.js} +2 -1
- package/dist/shared/chunk-SY6DZLTC.js.map +1 -0
- package/dist/shared/{chunk-RJZZWCBD.js → chunk-VEDQV5XO.js} +1 -0
- package/dist/shared/chunk-VEDQV5XO.js.map +1 -0
- package/dist/shared/{chunk-JRCVYDCD.js → chunk-W33JMRRN.js} +2 -1
- package/dist/shared/chunk-W33JMRRN.js.map +1 -0
- package/dist/shared/{chunk-Y3X4F4YJ.js → chunk-WBZW5LVH.js} +2 -1
- package/dist/shared/chunk-WBZW5LVH.js.map +1 -0
- package/dist/shared/{chunk-SDS4QU72.js → chunk-WHTPGWUV.js} +2 -1
- package/dist/shared/chunk-WHTPGWUV.js.map +1 -0
- package/dist/shared/{chunk-LT4CW2F7.js → chunk-WYVJE6J5.js} +2 -1
- package/dist/shared/chunk-WYVJE6J5.js.map +1 -0
- package/dist/shared/{chunk-PO6UODZ5.js → chunk-ZA3GAB4H.js} +2 -1
- package/dist/shared/chunk-ZA3GAB4H.js.map +1 -0
- package/dist/shared/{chunk-2CYAFF56.js → chunk-ZFCUSWMT.js} +1 -0
- package/dist/shared/chunk-ZFCUSWMT.js.map +1 -0
- package/dist/shared/{chunk-UCR2UZOY.js → chunk-ZQPXQCY2.js} +2 -1
- package/dist/shared/chunk-ZQPXQCY2.js.map +1 -0
- package/dist/shared/{chunk-DHSWVVMI.js → chunk-ZTZJHY4E.js} +2 -1
- package/dist/shared/chunk-ZTZJHY4E.js.map +1 -0
- package/dist/shared/context.js +1 -0
- package/dist/shared/context.js.map +1 -0
- package/dist/shared/datarecords/external/airtable/handler.js +1 -0
- package/dist/shared/datarecords/external/airtable/handler.js.map +1 -0
- package/dist/shared/datarecords/external/airtable/oauth/config.js +1 -0
- package/dist/shared/datarecords/external/airtable/oauth/config.js.map +1 -0
- package/dist/shared/datarecords/external/airtable/types.js +2 -1
- package/dist/shared/datarecords/external/airtable/types.js.map +1 -0
- package/dist/shared/datarecords/external/generic-webhook/handler.js +1 -0
- package/dist/shared/datarecords/external/generic-webhook/handler.js.map +1 -0
- package/dist/shared/datarecords/external/generic-webhook/options.js +1 -0
- package/dist/shared/datarecords/external/generic-webhook/options.js.map +1 -0
- package/dist/shared/datarecords/external/google/oauth/config.js +1 -0
- package/dist/shared/datarecords/external/google/oauth/config.js.map +1 -0
- package/dist/shared/datarecords/external/google/sheets/client.js +2 -1
- package/dist/shared/datarecords/external/google/sheets/client.js.map +1 -0
- package/dist/shared/datarecords/external/google/sheets/handler.js +2 -1
- package/dist/shared/datarecords/external/google/sheets/handler.js.map +1 -0
- package/dist/shared/datarecords/external/google/sheets/types.js +2 -1
- package/dist/shared/datarecords/external/google/sheets/types.js.map +1 -0
- package/dist/shared/datarecords/external/notion/handler.js +1 -0
- package/dist/shared/datarecords/external/notion/handler.js.map +1 -0
- package/dist/shared/datarecords/external/notion/oauth/config.js +1 -0
- package/dist/shared/datarecords/external/notion/oauth/config.js.map +1 -0
- package/dist/shared/datarecords/external/notion/types.js +2 -1
- package/dist/shared/datarecords/external/notion/types.js.map +1 -0
- package/dist/shared/datarecords/types.js +2 -1
- package/dist/shared/datarecords/types.js.map +1 -0
- package/dist/shared/datarecords.js +1 -0
- package/dist/shared/datarecords.js.map +1 -0
- package/dist/shared/datasources/external/facebook/posts/fetcher.js +2 -1
- package/dist/shared/datasources/external/facebook/posts/fetcher.js.map +1 -0
- package/dist/shared/datasources/external/facebook/posts/schema.js +1 -0
- package/dist/shared/datasources/external/facebook/posts/schema.js.map +1 -0
- package/dist/shared/datasources/external/http-json/fetcher.js +2 -1
- package/dist/shared/datasources/external/http-json/fetcher.js.map +1 -0
- package/dist/shared/datasources/external/http-json/options.js +1 -0
- package/dist/shared/datasources/external/http-json/options.js.map +1 -0
- package/dist/shared/datasources/external/http-json/schema.js +1 -0
- package/dist/shared/datasources/external/http-json/schema.js.map +1 -0
- package/dist/shared/datasources/external/instagram/feed/fetcher.js +2 -1
- package/dist/shared/datasources/external/instagram/feed/fetcher.js.map +1 -0
- package/dist/shared/datasources/external/instagram/feed/schema.js +1 -0
- package/dist/shared/datasources/external/instagram/feed/schema.js.map +1 -0
- package/dist/shared/datasources/external/mastodon/account/fetcher.js +2 -1
- package/dist/shared/datasources/external/mastodon/account/fetcher.js.map +1 -0
- package/dist/shared/datasources/external/mastodon/account/schema.js +2 -1
- package/dist/shared/datasources/external/mastodon/account/schema.js.map +1 -0
- package/dist/shared/datasources/external/mastodon/options.js +1 -0
- package/dist/shared/datasources/external/mastodon/options.js.map +1 -0
- package/dist/shared/datasources/external/mastodon/status/fetcher.js +2 -1
- package/dist/shared/datasources/external/mastodon/status/fetcher.js.map +1 -0
- package/dist/shared/datasources/external/mastodon/status/sample.array.js +1 -0
- package/dist/shared/datasources/external/mastodon/status/sample.array.js.map +1 -0
- package/dist/shared/datasources/external/mastodon/status/sample.single.js +1 -0
- package/dist/shared/datasources/external/mastodon/status/sample.single.js.map +1 -0
- package/dist/shared/datasources/external/mastodon/status/schema.js +2 -1
- package/dist/shared/datasources/external/mastodon/status/schema.js.map +1 -0
- package/dist/shared/datasources/external/meta/oauth/config.js +2 -1
- package/dist/shared/datasources/external/meta/oauth/config.js.map +1 -0
- package/dist/shared/datasources/external/meta/options.js +1 -0
- package/dist/shared/datasources/external/meta/options.js.map +1 -0
- package/dist/shared/datasources/external/rss/fetcher.js +2 -1
- package/dist/shared/datasources/external/rss/fetcher.js.map +1 -0
- package/dist/shared/datasources/external/rss/options.js +1 -0
- package/dist/shared/datasources/external/rss/options.js.map +1 -0
- package/dist/shared/datasources/external/rss/schema.js +2 -1
- package/dist/shared/datasources/external/rss/schema.js.map +1 -0
- package/dist/shared/datasources/external/threads/media/fetcher.js +2 -1
- package/dist/shared/datasources/external/threads/media/fetcher.js.map +1 -0
- package/dist/shared/datasources/external/threads/media/schema.js +1 -0
- package/dist/shared/datasources/external/threads/media/schema.js.map +1 -0
- package/dist/shared/datasources/external/tiktok/oauth/config.js +2 -1
- package/dist/shared/datasources/external/tiktok/oauth/config.js.map +1 -0
- package/dist/shared/datasources/external/tiktok/video/fetcher.js +2 -1
- package/dist/shared/datasources/external/tiktok/video/fetcher.js.map +1 -0
- package/dist/shared/datasources/external/tiktok/video/options.js +1 -0
- package/dist/shared/datasources/external/tiktok/video/options.js.map +1 -0
- package/dist/shared/datasources/external/tiktok/video/schema.js +1 -0
- package/dist/shared/datasources/external/tiktok/video/schema.js.map +1 -0
- package/dist/shared/datasources/external/youtube/list/fetcher.js +2 -1
- package/dist/shared/datasources/external/youtube/list/fetcher.js.map +1 -0
- package/dist/shared/datasources/external/youtube/list/options.js +1 -0
- package/dist/shared/datasources/external/youtube/list/options.js.map +1 -0
- package/dist/shared/datasources/external/youtube/list/schema.js +2 -1
- package/dist/shared/datasources/external/youtube/list/schema.js.map +1 -0
- package/dist/shared/datasources/external/youtube/oauth/config.js +2 -1
- package/dist/shared/datasources/external/youtube/oauth/config.js.map +1 -0
- package/dist/shared/datasources/fetcher.js +1 -0
- package/dist/shared/datasources/fetcher.js.map +1 -0
- package/dist/shared/datasources/internal/blog/schema.js +1 -0
- package/dist/shared/datasources/internal/blog/schema.js.map +1 -0
- package/dist/shared/datasources/internal/changelog/schema.js +1 -0
- package/dist/shared/datasources/internal/changelog/schema.js.map +1 -0
- package/dist/shared/datasources/internal/contact-info/schema.js +2 -1
- package/dist/shared/datasources/internal/contact-info/schema.js.map +1 -0
- package/dist/shared/datasources/internal/cv/schema.js +1 -0
- package/dist/shared/datasources/internal/cv/schema.js.map +1 -0
- package/dist/shared/datasources/internal/faq/schema.js +1 -0
- package/dist/shared/datasources/internal/faq/schema.js.map +1 -0
- package/dist/shared/datasources/internal/job-board/schema.js +1 -0
- package/dist/shared/datasources/internal/job-board/schema.js.map +1 -0
- package/dist/shared/datasources/internal/links/schema.js +2 -1
- package/dist/shared/datasources/internal/links/schema.js.map +1 -0
- package/dist/shared/datasources/internal/recipes/schema.js +1 -0
- package/dist/shared/datasources/internal/recipes/schema.js.map +1 -0
- package/dist/shared/datasources/internal/restaurant/schema.js +1 -0
- package/dist/shared/datasources/internal/restaurant/schema.js.map +1 -0
- package/dist/shared/datasources/samples.js +1 -0
- package/dist/shared/datasources/samples.js.map +1 -0
- package/dist/shared/datasources/schemas.js +2 -1
- package/dist/shared/datasources/schemas.js.map +1 -0
- package/dist/shared/datasources/types.js +2 -1
- package/dist/shared/datasources/types.js.map +1 -0
- package/dist/shared/datasources/utils.js +2 -1
- package/dist/shared/datasources/utils.js.map +1 -0
- package/dist/shared/datasources.js +1 -0
- package/dist/shared/datasources.js.map +1 -0
- package/dist/shared/env.js +1 -0
- package/dist/shared/env.js.map +1 -0
- package/dist/shared/errors.js +2 -1
- package/dist/shared/errors.js.map +1 -0
- package/dist/shared/images.js +2 -1
- package/dist/shared/images.js.map +1 -0
- package/dist/shared/index.js +1 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/shared/layout-constants.js +1 -0
- package/dist/shared/layout-constants.js.map +1 -0
- package/dist/shared/manifest.js +1 -0
- package/dist/shared/manifest.js.map +1 -0
- package/dist/shared/oauth.js +2 -1
- package/dist/shared/oauth.js.map +1 -0
- package/dist/shared/page.js +2 -1
- package/dist/shared/page.js.map +1 -0
- package/dist/shared/prompt.js +2 -1
- package/dist/shared/prompt.js.map +1 -0
- package/dist/shared/responsive.js +2 -1
- package/dist/shared/responsive.js.map +1 -0
- package/dist/shared/site.js +2 -1
- package/dist/shared/site.js.map +1 -0
- package/dist/shared/sitemap.js +2 -1
- package/dist/shared/sitemap.js.map +1 -0
- package/dist/shared/social-icons.js +1 -0
- package/dist/shared/social-icons.js.map +1 -0
- package/dist/shared/theme.js +2 -1
- package/dist/shared/theme.js.map +1 -0
- 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 +2 -1
- package/dist/shared/themes/color-system.js.map +1 -0
- package/dist/shared/utils/canvas-data-uri.js +1 -0
- package/dist/shared/utils/canvas-data-uri.js.map +1 -0
- package/dist/shared/utils/invariant.js +2 -1
- package/dist/shared/utils/invariant.js.map +1 -0
- package/dist/shared/utils/json-date.js +2 -1
- package/dist/shared/utils/json-date.js.map +1 -0
- package/dist/shared/utils/llm.js +2 -1
- package/dist/shared/utils/llm.js.map +1 -0
- package/dist/shared/utils/merge.js +2 -1
- package/dist/shared/utils/merge.js.map +1 -0
- package/dist/shared/utils/object-hash.js +1 -0
- package/dist/shared/utils/object-hash.js.map +1 -0
- package/dist/shared/utils/schema.js +2 -1
- package/dist/shared/utils/schema.js.map +1 -0
- package/dist/shared/utils/string-enum.js +2 -1
- package/dist/shared/utils/string-enum.js.map +1 -0
- package/dist/shared/utils/try-catch.js +1 -0
- package/dist/shared/utils/try-catch.js.map +1 -0
- package/dist/shared/utils/typed-ref.js +2 -1
- package/dist/shared/utils/typed-ref.js.map +1 -0
- package/package.json +7 -7
- package/src/shared/theme.ts +6 -6
- package/src/shared/themes/color-system.ts +0 -1
- package/src/shared/themes/tests/color-system.test.ts +5 -1
- package/dist/shared/chunk-5DZIQGY2.js +0 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
2
|
|
|
3
|
-
import{a as J}from"./chunk-3FPFR5RA.js";import{c as N,e as E}from"./chunk-7UBMXMNJ.js";import{a as K}from"./chunk-US53TNMK.js";import{a as P,e as W}from"./chunk-VK26ZZFR.js";import{a as B}from"./chunk-MVCVVKBY.js";import{a as _,c as C}from"./chunk-AB3IMRXZ.js";import{a as $,c as j}from"./chunk-GC5OWY2Z.js";import{a as F,c as k}from"./chunk-DHSWVVMI.js";import{b as M}from"./chunk-Z4YKRLOX.js";import{a as I,c as D}from"./chunk-SFDRAHYP.js";import{a as R}from"./chunk-JRCVYDCD.js";import{a as A,c as w,e as T}from"./chunk-DKNOZLA6.js";import{b as U}from"./chunk-HSRXUIVM.js";import{a as L}from"./chunk-5WY7LYXK.js";import{a as q}from"./chunk-SFKZAUPW.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};
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shared/ajv.ts","../../src/shared/bricks/props/dynamic.ts","../../src/shared/datasources/types.ts","../../src/shared/utils/llm.ts"],"sourcesContent":["import Ajv, { type ErrorObject } from \"ajv\";\nimport addFormats from \"ajv-formats\";\nimport { alignItems, alignSelf, justifyContent } from \"./bricks/props/align\";\nimport { background, backgroundColor } from \"./bricks/props/background\";\nimport { border, rounding } from \"./bricks/props/border\";\nimport { borderColor, color } from \"./bricks/props/color\";\nimport { hidden } from \"./bricks/props/common\";\nimport { cssLength } from \"./bricks/props/css-length\";\nimport { shadow, textShadow } from \"./bricks/props/effects\";\nimport { fontSize, textContent } from \"./bricks/props/text\";\nimport { icon, urlOrPageId } from \"./bricks/props/string\";\nimport { colorPreset } from \"./bricks/props/color-preset\";\nimport { image } from \"./bricks/props/image\";\nimport { direction } from \"./bricks/props/direction\";\nimport { loop, queryUse } from \"./bricks/props/dynamic\";\nimport { tags } from \"./bricks/props/tags\";\n\nexport type { AnySchemaObject, JSONSchemaType, JSONType, SchemaObject } from \"ajv\";\n\nexport const jsonStringsSupportedFormats = [\"date-time\", \"date\", \"email\", \"url\"] as const;\n\nexport function createAJVInstance() {\n const ajv = new Ajv({\n useDefaults: true,\n strictSchema: false,\n validateSchema: false,\n coerceTypes: true,\n allErrors: true,\n inlineRefs: true,\n });\n\n ajv.addSchema(background(), \"styles:background\");\n ajv.addSchema(backgroundColor(), \"styles:backgroundColor\");\n ajv.addSchema(justifyContent(), \"styles:justifyContent\");\n ajv.addSchema(alignItems(), \"styles:alignItems\");\n ajv.addSchema(alignSelf(), \"styles:alignSelf\");\n ajv.addSchema(rounding(), \"styles:rounding\");\n ajv.addSchema(fontSize(), \"styles:fontSize\");\n ajv.addSchema(hidden(), \"styles:hidden\");\n ajv.addSchema(direction(), \"styles:direction\");\n ajv.addSchema(border(), \"styles:border\");\n ajv.addSchema(color(), \"styles:color\");\n ajv.addSchema(borderColor(), \"styles:borderColor\");\n ajv.addSchema(shadow(), \"styles:shadow\");\n ajv.addSchema(textShadow(), \"styles:textShadow\");\n ajv.addSchema(cssLength(), \"styles:cssLength\");\n ajv.addSchema(image(), \"assets:image\");\n ajv.addSchema(icon(), \"assets:icon\");\n ajv.addSchema(textContent(), \"content:text\");\n ajv.addSchema(urlOrPageId(), \"content:urlOrPageId\");\n ajv.addSchema(loop(), \"content:loop\");\n ajv.addSchema(queryUse(), \"content:queryUse\");\n ajv.addSchema(colorPreset(), \"presets:color\");\n ajv.addSchema(tags(), \"content:tags\");\n\n // Add formats to Ajv\n addFormats(ajv, [...jsonStringsSupportedFormats]);\n\n ajv.addFormat(\"slug\", {\n validate: (data: string) => typeof data === \"string\",\n async: false,\n type: \"string\",\n });\n ajv.addFormat(\"image\", {\n validate: (data: string) => typeof data === \"string\",\n async: false,\n type: \"string\",\n });\n ajv.addFormat(\"file\", {\n validate: (data: string) => typeof data === \"string\",\n async: false,\n type: \"string\",\n });\n\n ajv.addFormat(\"nanoid\", {\n validate: (data: string) => typeof data === \"string\",\n async: false,\n type: \"string\",\n });\n\n ajv.addFormat(\"richtext\", {\n validate: (data: string) => typeof data === \"string\",\n async: false,\n type: \"string\",\n });\n\n ajv.addFormat(\"markdown\", {\n validate: (data: string) => typeof data === \"string\",\n async: false,\n type: \"string\",\n });\n\n ajv.addFormat(\"multiline\", {\n validate: (data: string) => typeof data === \"string\",\n async: false,\n type: \"string\",\n });\n\n ajv.addFormat(\"password\", {\n validate: (data: string) => typeof data === \"string\",\n async: false,\n type: \"string\",\n });\n return ajv;\n}\n\nexport const ajv = createAJVInstance();\n\nexport function serializeAjvErrors(errors: ErrorObject[] | null | undefined): string {\n if (!errors || errors.length === 0) {\n return \"Unknown validation error\";\n }\n return errors\n .map((error) => {\n const { instancePath, message, params } = error;\n const path = instancePath || \"root\";\n const details = Object.entries(params || {})\n .map(([key, value]) => `${key}: ${value}`)\n .join(\", \");\n return `${path} ${message} (${details})`;\n })\n .join(\"; \");\n}\n","import { typedRef } from \"~/shared/utils/typed-ref\";\nimport { type ObjectOptions, Type, type Static } from \"@sinclair/typebox\";\nimport { queryFilter } from \"~/shared/datasources/types\";\nimport { over } from \"lodash-es\";\n\nexport function queryUse() {\n return Type.Object(\n {\n queryId: Type.String({\n description: \"The Site Query ID to use.\",\n }),\n alias: Type.String({\n title: \"Alias\",\n minLength: 1,\n maxLength: 100,\n pattern: \"^[a-zA-Z0-9_]+$\",\n description:\n \"Alias for the query results, used in dynamic content. Use a simple keyword without spaces or special characters. Aliases are unique across the page.\",\n \"ai:instructions\":\n \"Use a simple keyword without spaces or special characters. Aliases are unique across the page. You can use the same query several times with different aliases in order to, for example, apply different parameters to the same query.\",\n }),\n params: Type.Optional(\n Type.Array(queryFilter, {\n description:\n \"Additional query parameters/filters to apply to the query. One can use placeholders in values like ':slug' to reference URL parameters.\",\n title: \"Query Parameters\",\n default: [],\n }),\n ),\n },\n {\n title: \"Query\",\n description:\n \"When set, this brick will loop through the results of the query and render the content for each item.\",\n // $id: \"content:queryUse\",\n \"ui:field\": \"query\",\n metadata: {\n category: \"content\",\n },\n examples: [\n { queryId: \"get-latest-posts\", alias: \"latestPosts\" },\n {\n queryId: \"get-user-profile\",\n alias: \"userProfile\",\n params: [{ field: \"userId\", op: \"eq\", value: \":slug\" }],\n },\n {\n queryId: \"get-posts-by-category\",\n alias: \"postsByCategory\",\n params: [{ field: \"category\", op: \"eq\", value: \":slug\" }],\n },\n ],\n },\n );\n}\n\nexport const queryUseSchema = queryUseRef();\n\nexport type QueryUseSettings = Static<ReturnType<typeof queryUse>>;\n\nexport function queryUseRef(options: ObjectOptions = {}) {\n return typedRef(\"content:queryUse\", options);\n}\n\nexport function loop(options: ObjectOptions = {}) {\n return Type.Object(\n {\n over: Type.String({\n title: \"Over\",\n description: \"The query alias to loop over. If not set, the brick will be rendered only once.\",\n \"ai:instructions\": \"Specify the Query Alias to loop over the results.\",\n }),\n overrideLimit: Type.Optional(\n Type.Number({\n minimum: 1,\n description:\n \"Override the limit of items to loop through. If not set, it will use the default limit of the query. If set to 1, it will not loop and will render only the first item.\",\n }),\n ),\n },\n {\n // $id: \"content:loop\",\n title: \"Repeat over\",\n description: \"Repeat this brick for each item in the specified query results.\",\n \"ui:field\": \"loop\",\n \"ui:hidden-if\": \"no-page-queries\",\n metadata: {\n category: \"content\",\n },\n examples: [\n {\n over: \"latestBlogPosts\",\n overrideLimit: 5,\n },\n {\n over: \"featuredProducts\",\n overrideLimit: 3,\n },\n {\n over: \"popularProducts\",\n },\n ],\n ...options,\n },\n );\n}\n\nexport type LoopSettings = Static<ReturnType<typeof loop>>;\n\nexport function loopRef(options: ObjectOptions = {}) {\n return typedRef(\"content:loop\", options);\n}\n","import { Type, type Static } from \"@sinclair/typebox\";\nimport { httpJsonOptions } from \"./external/http-json/options\";\nimport { StringEnum } from \"../utils/string-enum\";\nimport { toLLMSchema } from \"../utils/llm\";\n\nexport const providersSchema = Type.Union([\n // Type.Literal(\"facebook-posts\"),\n // Type.Literal(\"instagram-feed\"),\n // Type.Literal(\"mastodon-account\"),\n // Type.Literal(\"mastodon-status\"),\n // Type.Literal(\"mastodon-status-list\"),\n Type.Literal(\"internal\"),\n // Type.Literal(\"rss\"),\n // // Type.Literal(\"threads-media\"),\n // // Type.Literal(\"tiktok-video\"),\n // Type.Literal(\"youtube-list\"),\n // Type.Literal(\"http-json\"),\n // Type.Literal(\"internal-blog\"),\n // Type.Literal(\"internal-changelog\"),\n // // Type.Literal(\"internal-contact-info\"),\n // Type.Literal(\"internal-faq\"),\n // Type.Literal(\"internal-links\"),\n // Type.Literal(\"internal-recipes\"),\n // Type.Literal(\"internal-restaurant\"),\n // Type.Literal(\"internal-cv\"),\n]);\n\nexport type DatasourceProvider = Static<typeof providersSchema>;\n\n// const datasourceProviderManifest = Type.Composite([\n// Type.Object({\n// id: Type.String({\n// title: \"ID\",\n// description:\n// \"Unique identifier of the datasource. Used to reference the datasource in the system. Use a url-safe string like a slug.\",\n// }),\n// label: Type.String({ title: \"Label\", description: \"Label of the datasource displayed in the UI\" }),\n// schema: Type.Null({\n// description: \"Always null for provider datasources. The schema is defined by the provider.\",\n// }),\n// ttlMinutes: Type.Optional(\n// Type.Number({\n// title: \"Time to live\",\n// description:\n// \"Time to live in minutes. If set to -1, it never expires and has to be manually refreshed. If set to 0, the datasource is always fetched live. If > 0, then the datasource is feteched every N minutes.\",\n// }),\n// ),\n// refresh: Type.Optional(\n// Type.Object(\n// {\n// method: Type.Union([Type.Literal(\"interval\"), Type.Literal(\"manual\"), Type.Literal(\"live\")]),\n// interval: Type.Optional(Type.Number()),\n// },\n// {\n// title: \"Refresh options\",\n// description: \"Options to refresh the datasource\",\n// },\n// ),\n// ),\n// }),\n// ]);\n\n// export type DatasourceProviderManifest = Static<typeof datasourceProviderManifest>;\n\nconst datasourceInternalManifest = Type.Object(\n {\n id: Type.String({\n title: \"ID\",\n description:\n \"Unique identifier of the datasource. Used to reference the datasource in the system. Use a url-safe string like a slug.\",\n }),\n label: Type.String({ title: \"Label\", description: \"Label of the datasource displayed in the UI\" }),\n provider: Type.Literal(\"internal\", {\n title: \"Internal\",\n description: \"Internal datasource saved locally in Upstart.\",\n }),\n schema: Type.Any({\n title: \"Schema\",\n description: \"JSON Schema of datasource. MUST Always an array of objects.\",\n }),\n indexes: Type.Optional(\n Type.Array(\n Type.Object({\n name: Type.String({ title: \"Index name\" }),\n fields: Type.Array(Type.String(), { title: \"Fields to index\" }),\n unique: Type.Optional(Type.Boolean({ title: \"Unique index\", default: false })),\n }),\n {\n title: \"Indexes\",\n description:\n \"IMPORTANT: Indexes to create on the datasource. use it to enforce uniqueness or improve query performance.\",\n },\n ),\n ),\n },\n {\n examples: [\n {\n id: \"customers\",\n label: \"Customers\",\n provider: \"internal\",\n schema: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n name: { type: \"string\", title: \"Name\" },\n email: { type: \"string\", title: \"Email\", format: \"email\" },\n },\n required: [\"name\", \"email\"],\n title: \"Customer\",\n examples: [\n { name: \"John Doe\", email: \"john.doe@example.com\" },\n {\n name: \"Jane Smith\",\n email: \"jane.smith@example.com\",\n },\n {\n name: \"Alice Johnson\",\n email: \"alice.johnson@example.com\",\n },\n {\n name: \"Bob Brown\",\n email: \"bob.brown@example.com\",\n },\n {\n name: \"Charlie Davis\",\n email: \"charlie.davis@example.com\",\n },\n ],\n },\n },\n indexes: [\n {\n name: \"idx_customers_email\",\n fields: [\"email\"],\n unique: true,\n },\n ],\n },\n {\n id: \"blog_posts\",\n label: \"Blog Posts\",\n provider: \"internal\",\n schema: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n title: { type: \"string\", title: \"Title\" },\n content: { type: \"string\", title: \"Content\" },\n author: { type: \"string\", title: \"Author\" },\n },\n required: [\"title\", \"content\", \"author\"],\n title: \"Blog Post\",\n examples: [\n {\n title: \"My First Blog Post\",\n content: \"This is the content of my first blog post.\",\n author: \"John Doe\",\n },\n {\n title: \"Exploring the Cosmos\",\n content: \"A journey through the stars and galaxies.\",\n author: \"Jane Smith\",\n },\n {\n title: \"The Art of Cooking\",\n content: \"Delicious recipes and cooking tips.\",\n author: \"Alice Johnson\",\n },\n {\n title: \"Traveling the World\",\n content: \"My adventures in different countries.\",\n author: \"Bob Brown\",\n },\n {\n title: \"Technology Trends\",\n content: \"The latest trends in technology.\",\n author: \"Charlie Davis\",\n },\n ],\n },\n },\n indexes: [\n {\n name: \"idx_blog_posts_title\",\n fields: [\"title\"],\n unique: true,\n },\n ],\n },\n ],\n },\n);\n\nexport type InternalDatasource = Static<typeof datasourceInternalManifest>;\n\n// const datasourceJsonManifest = Type.Composite([\n// datasourceBaseFields,\n// Type.Object({\n// provider: Type.Literal(\"http-json\", {\n// title: \"JSON Array\",\n// description: \"JSON array datasource.\",\n// }),\n// options: httpJsonOptions,\n// schema: Type.Any({\n// title: \"Schema\",\n// description: \"JSON Schema of datasource. Always an array of objects.\",\n// examples: [\n// {\n// type: \"array\",\n// items: {\n// type: \"object\",\n// properties: {\n// id: { type: \"string\", title: \"ID\" },\n// title: { type: \"string\", title: \"Title\" },\n// firstname: { type: \"string\", title: \"Firstname\" },\n// lastname: { type: \"string\", title: \"Lastname\" },\n// createdAt: { type: \"string\", format: \"date-time\", title: \"Created at\" },\n// email: { type: \"string\", format: \"email\", title: \"Email\" },\n// },\n// required: [\"id\", \"title\", \"firstname\", \"lastname\", \"email\", \"createdAt\"],\n// title: \"Employee\",\n// },\n// title: \"Employees\",\n// description: \"Employees list\",\n// },\n// ],\n// }),\n// }),\n// ]);\n\n// type DatasourceJsonArrayManifest = Static<typeof datasourceJsonManifest>;\n\n// Fow now, let support only custom (internal) datasource\n// export const datasourceManifest = datasourceCustomManifest;\nexport const datasourceManifest = datasourceInternalManifest;\n\nexport function getDatasourceManifestForLLM() {\n return toLLMSchema(datasourceManifest);\n}\n\nexport type Datasource = Static<typeof datasourceManifest>;\nexport const datasourcesList = Type.Array(datasourceManifest);\nexport type DatasourcesList = Static<typeof datasourcesList>;\n\nconst stringFilter = Type.Object({\n field: Type.String(),\n op: Type.Union([\n Type.Literal(\"eq\"),\n Type.Literal(\"ne\"),\n Type.Literal(\"contains\"),\n Type.Literal(\"notContains\"),\n Type.Literal(\"startsWith\"),\n Type.Literal(\"notStartsWith\"),\n Type.Literal(\"endsWith\"),\n Type.Literal(\"notEndsWith\"),\n ]),\n value: Type.String(),\n});\n\nconst numberFilter = Type.Object({\n field: Type.String(),\n op: Type.Union([\n Type.Literal(\"eq\"),\n Type.Literal(\"ne\"),\n Type.Literal(\"lt\"),\n Type.Literal(\"lte\"),\n Type.Literal(\"gt\"),\n Type.Literal(\"gte\"),\n ]),\n value: Type.Number(),\n});\n\nconst dateFilterAbsolute = Type.Object({\n field: Type.String(),\n op: Type.Union([Type.Literal(\"before\"), Type.Literal(\"after\")]),\n value: Type.String(),\n});\n\nconst dateFilterRelative = Type.Object({\n field: Type.String(),\n op: Type.Union([Type.Literal(\"beforeNow\"), Type.Literal(\"afterNow\")]),\n value: Type.Null(),\n});\n\nconst arrayFilter = Type.Object({\n field: Type.String(),\n op: Type.Union([\n Type.Literal(\"contains\"),\n Type.Literal(\"notContains\"),\n Type.Literal(\"containsAll\"),\n Type.Literal(\"containsAny\"),\n Type.Literal(\"notContainsAny\"),\n ]),\n value: Type.Array(Type.String()),\n});\n\nconst booleanFilter = Type.Object({\n field: Type.String(),\n op: Type.Literal(\"eq\"),\n value: Type.Boolean(),\n});\n\nexport const queryFilter = Type.Union([\n stringFilter,\n numberFilter,\n dateFilterAbsolute,\n dateFilterRelative,\n arrayFilter,\n booleanFilter,\n]);\n\nconst filterExpression = Type.Recursive(\n (This) =>\n Type.Union(\n [\n Type.Object({\n op: Type.Literal(\"and\"),\n fields: Type.Array(Type.Union([queryFilter, This]), { title: \"Indexed Fields\" }),\n }),\n Type.Object({\n op: Type.Literal(\"or\"),\n fields: Type.Array(Type.Union([queryFilter, This])),\n }),\n ],\n {\n default: {\n op: \"and\",\n fields: [],\n },\n examples: [\n {\n op: \"and\",\n fields: [\n {\n field: \"$id\",\n op: \"eq\",\n value: \"123\",\n },\n {\n field: \"$publicationDate\",\n op: \"beforeNow\",\n },\n ],\n },\n ],\n },\n ),\n {\n title: \"Filter Expression\",\n description: \"Expression used to filter query results. Can be a combination of and/or conditions.\",\n },\n);\n\nexport const querySchema = Type.Object(\n {\n id: Type.String({\n title: \"Query ID\",\n description:\n \"Unique identifier for the query. Used to reference the query in the system. URL-safe string like a slug.\",\n }),\n label: Type.String({\n title: \"Label\",\n maxLength: 100,\n description: \"Label of the query displayed in the UI\",\n }),\n datasourceId: Type.String({\n title: \"Database\",\n description: \"ID of the datasource to query\",\n }),\n limit: Type.Number({\n title: \"Limit\",\n description: \"Limit the number of records to fetch from the datasource.\",\n minimum: 1,\n default: 10,\n }),\n sortDirection: Type.Optional(\n StringEnum([\"asc\", \"desc\"], {\n title: \"Sort\",\n enumNames: [\"Ascending\", \"Descending\"],\n description: \"Direction to sort the records by\",\n default: \"desc\",\n }),\n ),\n sortField: Type.Optional(\n Type.String({\n title: \"Sort Field\",\n description: \"Field to sort by (must be an indexed field)\",\n default: \"$publicationDate\",\n }),\n ),\n filters: Type.Optional(filterExpression),\n parameters: Type.Optional(\n Type.Array(\n Type.Object({\n field: Type.String({ title: \"Field\", description: \"Field name to use as parameter\" }),\n op: Type.Union(\n [\n Type.Literal(\"eq\"),\n Type.Literal(\"ne\"),\n Type.Literal(\"contains\"),\n Type.Literal(\"notContains\"),\n Type.Literal(\"startsWith\"),\n Type.Literal(\"notStartsWith\"),\n Type.Literal(\"endsWith\"),\n Type.Literal(\"notEndsWith\"),\n Type.Literal(\"lt\"),\n Type.Literal(\"lte\"),\n Type.Literal(\"gt\"),\n Type.Literal(\"gte\"),\n Type.Literal(\"before\"),\n Type.Literal(\"after\"),\n Type.Literal(\"beforeNow\"),\n Type.Literal(\"afterNow\"),\n Type.Literal(\"containsAll\"),\n Type.Literal(\"containsAny\"),\n Type.Literal(\"notContainsAny\"),\n ],\n { title: \"Operator\", description: \"Operator to use for the parameter\" },\n ),\n }),\n {\n title: \"Parameters\",\n description:\n \"Field name and operator that will be used as parameters when using the query in pages. Only indexed fields can be used as parameters.\",\n default: [],\n examples: [\n [{ field: \"$slug\", op: \"eq\" }],\n [{ field: \"category\", op: \"eq\" }],\n [{ field: \"tags\", op: \"containsAny\" }],\n [{ field: \"author\", op: \"eq\" }],\n [{ field: \"title\", op: \"contains\" }],\n ],\n },\n ),\n ),\n },\n {\n examples: [\n {\n id: \"latest-posts\",\n label: \"Latest posts\",\n datasourceId: \"blog_posts\",\n limit: 5,\n sortDirection: \"desc\",\n sortField: \"$publicationDate\",\n },\n {\n id: \"posts-by-category\",\n label: \"Posts by category\",\n datasourceId: \"blog_posts\",\n limit: 10,\n sortDirection: \"desc\",\n sortField: \"$publicationDate\",\n parameters: [{ field: \"category\", op: \"eq\" }],\n },\n {\n id: \"posts-by-tag\",\n label: \"Posts by tag\",\n datasourceId: \"blog_posts\",\n limit: 10,\n sortDirection: \"desc\",\n sortField: \"$publicationDate\",\n parameters: [{ field: \"tags\", op: \"containsAny\" }],\n },\n {\n id: \"author-posts\",\n label: \"Author posts\",\n datasourceId: \"blog_posts\",\n limit: 10,\n sortDirection: \"desc\",\n sortField: \"$publicationDate\",\n parameters: [{ field: \"author\", op: \"eq\" }],\n },\n {\n id: \"search-posts\",\n label: \"Search posts\",\n datasourceId: \"blog_posts\",\n limit: 10,\n sortDirection: \"desc\",\n sortField: \"$publicationDate\",\n parameters: [{ field: \"title\", op: \"contains\" }],\n },\n ],\n },\n);\n\nexport type Query = Static<typeof querySchema>;\n","import type { TObject, TSchema } from \"@sinclair/typebox\";\nimport { createAJVInstance } from \"../ajv\";\nimport { cloneDeep } from \"lodash-es\";\nimport type Ajv from \"ajv\";\n\n/**\n * Clean all properties from custom metadata recursively. Custom metadata are key that:\n * - Either with the name \"metadata\"\n * - Or starting with \"ui:\"\n * Also removes properties that have \"ai:hidden\" set to true\n */\nexport function toLLMSchema<T extends TSchema = TObject>(schema: T, ajv?: Ajv): T {\n return cleanSchemaRecursive(inlineSchemaRefs(schema, ajv ?? createAJVInstance())) as T;\n}\n\n/**\n * Recursively removes custom metadata from schema and filters out properties with ai:hidden = true\n */\nfunction cleanSchemaRecursive(schema: TSchema): TSchema {\n // Create a new object without custom metadata properties\n const cleaned: Record<string, unknown> = {};\n\n for (const [key, value] of Object.entries(schema)) {\n // Skip metadata properties and ui: properties\n if (key === \"metadata\" || key.startsWith(\"ui:\")) {\n continue;\n }\n\n // Handle nested objects and arrays\n if (value && typeof value === \"object\") {\n if (Array.isArray(value)) {\n // Handle arrays - clean each item if it's a schema\n cleaned[key] = value.map((item) => {\n if (item && typeof item === \"object\" && isSchemaLike(item)) {\n return cleanSchemaRecursive(item as TSchema);\n }\n return item;\n });\n } else if (isSchemaLike(value)) {\n // Handle nested schemas\n cleaned[key] = cleanSchemaRecursive(value as TSchema);\n } else if (\n key === \"properties\" ||\n key === \"definitions\" ||\n key === \"$defs\" ||\n key === \"patternProperties\"\n ) {\n // Handle schema property collections - filter out properties with ai:hidden = true\n const cleanedProps: Record<string, TSchema> = {};\n for (const [propKey, propValue] of Object.entries(value)) {\n if (propValue && typeof propValue === \"object\") {\n // Check if this property should be hidden from AI\n const propSchema = propValue as Record<string, unknown>;\n if (propSchema[\"ai:hidden\"] === true) {\n continue; // Skip this property\n }\n cleanedProps[propKey] = cleanSchemaRecursive(propValue as TSchema);\n } else {\n cleanedProps[propKey] = propValue as TSchema;\n }\n }\n cleaned[key] = cleanedProps;\n } else {\n // For other objects, recursively clean if they look like schemas\n cleaned[key] = value;\n }\n } else {\n // Keep primitive values as-is\n cleaned[key] = value;\n }\n }\n\n return cleaned as TSchema;\n}\n\n/**\n * Helper function to determine if an object looks like a schema\n */\nfunction isSchemaLike(obj: unknown): boolean {\n if (!obj || typeof obj !== \"object\") {\n return false;\n }\n\n const schemaKeys = [\n \"type\",\n \"$ref\",\n \"properties\",\n \"items\",\n \"anyOf\",\n \"oneOf\",\n \"allOf\",\n \"not\",\n \"if\",\n \"then\",\n \"else\",\n ];\n return schemaKeys.some((key) => key in obj);\n}\n\ninterface SchemaWithDefs extends TSchema {\n $defs?: Record<string, TSchema>;\n}\n\n/**\n * Inlines referenced schemas from AJV into the schema's $defs section\n * @param schema - The schema containing $ref references\n * @param ajv - The AJV instance containing the referenced schemas\n * @returns A new schema with references inlined in $defs\n */\nexport function inlineSchemaRefs<T extends TSchema>(schema: T, ajv: Ajv) {\n //\n const inlinedSchema = cloneDeep(schema) as T & SchemaWithDefs;\n // const inlinedSchema = JSON.parse(JSON.stringify(schema)) as T & SchemaWithDefs;\n const collectedRefs = new Set<string>();\n\n // Initialize $defs if it doesn't exist\n if (!inlinedSchema.$defs) {\n inlinedSchema.$defs = {};\n }\n\n /**\n * Recursively traverse the schema to find all $ref references\n */\n function collectRefs(obj: unknown): void {\n if (typeof obj !== \"object\" || obj === null) return;\n\n if (Array.isArray(obj)) {\n obj.forEach(collectRefs);\n return;\n }\n\n for (const [key, value] of Object.entries(obj as Record<string, unknown>)) {\n if (key === \"$ref\" && typeof value === \"string\") {\n // Extract the schema ID from the reference\n if (!value.startsWith(\"#/\")) {\n collectedRefs.add(value);\n }\n } else {\n collectRefs(value);\n }\n }\n }\n\n /**\n * Convert external $ref to local $defs reference\n */\n function convertRefsToLocal(obj: unknown, refMap: Map<string, string>): unknown {\n if (typeof obj !== \"object\" || obj === null) return obj;\n\n if (Array.isArray(obj)) {\n return obj.map((item) => convertRefsToLocal(item, refMap));\n }\n\n const result: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(obj as Record<string, unknown>)) {\n if (key === \"$ref\" && typeof value === \"string\") {\n const localRef = refMap.get(value);\n result[key] = localRef || value;\n } else {\n result[key] = convertRefsToLocal(value, refMap);\n }\n }\n return result;\n }\n\n // Collect all references in the schema\n collectRefs(inlinedSchema);\n\n // Map to track original ref -> local def reference\n const refToLocalMap = new Map<string, string>();\n\n // Process each collected reference\n for (const refId of collectedRefs) {\n // Get the schema from AJV\n const referencedSchema = ajv.getSchema(refId);\n\n if (!referencedSchema?.schema) {\n // console.log(`Schema with ID \"${refId}\" not found in AJV instance`, { referencedSchema });\n continue;\n }\n\n // Create a safe key for $defs (remove special characters, use last part of URI)\n const defKey =\n refId.replace(/[^a-zA-Z0-9_-]/g, \"_\").replace(/^_+|_+$/g, \"\") ||\n refId\n .split(\"/\")\n .pop()\n ?.replace(/[^a-zA-Z0-9_-]/g, \"_\") ||\n `ref_${Object.keys(inlinedSchema.$defs!).length}`;\n\n // Ensure unique key\n let uniqueDefKey = defKey;\n let counter = 1;\n while (inlinedSchema.$defs![uniqueDefKey]) {\n uniqueDefKey = `${defKey}_${counter}`;\n counter++;\n }\n\n // Add to $defs\n const { $id, ...schemaWithoutId } = referencedSchema.schema as TSchema;\n inlinedSchema.$defs![uniqueDefKey] = schemaWithoutId;\n\n // Map original reference to local reference\n refToLocalMap.set(refId, `#/$defs/${uniqueDefKey}`);\n }\n\n // Convert all external references to local $defs references\n const finalSchema = convertRefsToLocal(inlinedSchema, refToLocalMap) as T & SchemaWithDefs;\n\n // Recursively inline references in the newly added $defs schemas\n if (finalSchema.$defs) {\n // Keep processing until no new references are found\n let foundNewRefs = true;\n while (foundNewRefs) {\n foundNewRefs = false;\n const newRefsFound = new Set<string>();\n\n // Check each $defs schema for new references\n for (const [defKey, defSchema] of Object.entries(finalSchema.$defs)) {\n const defCollectedRefs = new Set<string>();\n\n // Collect refs specifically for this schema\n function collectDefsRefs(obj: unknown): void {\n if (typeof obj !== \"object\" || obj === null) return;\n\n if (Array.isArray(obj)) {\n obj.forEach(collectDefsRefs);\n return;\n }\n\n for (const [key, value] of Object.entries(obj as Record<string, unknown>)) {\n if (key === \"$ref\" && typeof value === \"string\") {\n const refId = value.startsWith(\"#/\") ? value : value;\n if (!refId.startsWith(\"#/\")) {\n defCollectedRefs.add(refId);\n }\n } else {\n collectDefsRefs(value);\n }\n }\n }\n\n collectDefsRefs(defSchema);\n\n // Process any new references found in this $defs schema\n for (const refId of defCollectedRefs) {\n if (!refToLocalMap.has(refId)) {\n newRefsFound.add(refId);\n foundNewRefs = true;\n }\n }\n }\n\n // Add all newly found references to $defs\n for (const refId of newRefsFound) {\n const referencedSchema = ajv.getSchema(refId);\n if (referencedSchema?.schema) {\n const newDefKey =\n refId.replace(/[^a-zA-Z0-9_-]/g, \"_\").replace(/^_+|_+$/g, \"\") ||\n `ref_${Object.keys(finalSchema.$defs).length}`;\n\n let uniqueNewDefKey = newDefKey;\n let counter = 1;\n while (finalSchema.$defs[uniqueNewDefKey]) {\n uniqueNewDefKey = `${newDefKey}_${counter}`;\n counter++;\n }\n\n finalSchema.$defs[uniqueNewDefKey] = referencedSchema.schema as TSchema;\n refToLocalMap.set(refId, `#/$defs/${uniqueNewDefKey}`);\n }\n }\n }\n\n // Finally, update all $defs schemas with converted references\n for (const [defKey, defSchema] of Object.entries(finalSchema.$defs)) {\n finalSchema.$defs[defKey] = convertRefsToLocal(defSchema, refToLocalMap) as TSchema;\n }\n }\n\n return finalSchema as T & { $defs: Record<string, TSchema> };\n}\n"],"mappings":";;gpBAAA,OAAOA,OAA+B,MACtC,OAAOC,OAAgB,cCAvB,OAA6B,QAAAC,MAAyB,oBCDtD,OAAS,QAAAC,MAAyB,oBAK3B,IAAMC,GAAkBC,EAAK,MAAM,CAMxCA,EAAK,QAAQ,UAAU,CAczB,CAAC,EAuCKC,EAA6BD,EAAK,OACtC,CACE,GAAIA,EAAK,OAAO,CACd,MAAO,KACP,YACE,yHACJ,CAAC,EACD,MAAOA,EAAK,OAAO,CAAE,MAAO,QAAS,YAAa,6CAA8C,CAAC,EACjG,SAAUA,EAAK,QAAQ,WAAY,CACjC,MAAO,WACP,YAAa,+CACf,CAAC,EACD,OAAQA,EAAK,IAAI,CACf,MAAO,SACP,YAAa,6DACf,CAAC,EACD,QAASA,EAAK,SACZA,EAAK,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ForLLM","toLLMSchema","datasourcesList","stringFilter","numberFilter","dateFilterAbsolute","dateFilterRelative","arrayFilter","booleanFilter","queryFilter","filterExpression","This","querySchema","StringEnum","queryUse","Type","queryFilter","queryUseSchema","queryUseRef","options","typedRef","loop","loopRef","jsonStringsSupportedFormats","createAJVInstance","ajv","Ajv","background","backgroundColor","justifyContent","alignItems","alignSelf","rounding","fontSize","hidden","direction","border","color","borderColor","shadow","textShadow","cssLength","image","icon","textContent","urlOrPageId","loop","queryUse","colorPreset","tags","addFormats","data","serializeAjvErrors","errors","error","instancePath","message","params","path","details","key","value","cloneDeep","toLLMSchema","schema","ajv","cleanSchemaRecursive","inlineSchemaRefs","createAJVInstance","cleaned","key","value","item","isSchemaLike","cleanedProps","propKey","propValue","obj","inlinedSchema","collectedRefs","collectRefs","convertRefsToLocal","refMap","result","localRef","refToLocalMap","refId","referencedSchema","defKey","uniqueDefKey","counter","$id","schemaWithoutId","finalSchema","foundNewRefs","newRefsFound","defSchema","collectDefsRefs","defCollectedRefs","newDefKey","uniqueNewDefKey"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
2
|
|
|
3
|
-
import{b as m}from"./chunk-
|
|
3
|
+
import{b as m}from"./chunk-Q4H4QEMB.js";import{a as d}from"./chunk-SY6DZLTC.js";import{a as g}from"./chunk-7A2JNQX3.js";import{a}from"./chunk-KSEURRVZ.js";import{b as c}from"./chunk-QGYZ7CG5.js";import{a as i,h as l,k as p}from"./chunk-AFVJZPLS.js";import{b as u}from"./chunk-CCI4C3TM.js";import{a as t}from"./chunk-A3GF4PYW.js";import{b as o}from"./chunk-DHI3IBOD.js";import{c as n}from"./chunk-CZRCW5EN.js";import{a as s}from"./chunk-JMN3HTZU.js";import{Type as e}from"@sinclair/typebox";var h=e.Object({backgroundImage:e.Optional(o()),colorPreset:e.Optional(n({examples:[{color:"base-100"},{color:"primary-500"},{color:"accent-100",gradientDirection:"bg-gradient-to-r"}]})),tags:e.Optional(e.Array(t("Tag"),{title:"Tags",description:"Use tags to organize, group and filter pages in navigation elements and in the dashboard. By default, the navbar element display pages having the 'navbar' tag, while the sidebar displays the pages with the tag 'sidebar'.","ui:field":"tags",examples:[["navbar","navbar"],["navbar","sidebar"],["sidebar"]]})),path:t("URL path",{default:"/",description:"The URL path of the page. Use placeholders like :id or :slug for dynamic paths.","ui:field":"path",pattern:"^/[a-z0-9-:/]*$",examples:["/","/about","/products/:id"]}),queries:e.Optional(e.Array(p(),{title:"Page Queries",description:"List of queries to use in this page. All listed queries will be executed when the page loads.","ai:instructions":"Reference Query IDs to use at the page level.","ui:field":"page-queries",maxItems:5})),title:t("Title",{default:"Untitled","ui:group":"meta","ui:group:title":"Meta tags",description:"The title of the page. Appears in the browser tab and search results","ui:placeholder":"Page title"}),description:t("Description",{"ui:widget":"textarea","ui:group":"meta","ui:group:title":"Meta tags",description:"A short description of the page. Used by search engines","ui:multiline":!0,"ui:textarea-class":"h-24",default:"","ui:placeholder":"A brief description of the page"}),keywords:t("Keywords",{"ui:group":"meta","ui:group:title":"Meta tags",description:"Keywords related to the page. Used by search engines","ui:multiline":!0,default:"","ui:placeholder":"keyword1, keyword2, keyword3"}),ogImage:e.Optional(u({title:"Social share image",description:"Image shown when this page is shared on social media","ui:group":"meta","ai:hidden":!0,"ui:no-object-options":!0,"ui:no-alt-text":!0,"ui:show-img-search":!1,"ui:no-dynamic":!0,"ui:placeholder":"https://example.com/image.jpg"})),robotsIndexing:e.Optional(a("Allow search engines to index this page",!0,{description:"Disabling this will prevent search engines from indexing this page","ai:hidden":!0,"ui:group":"meta"})),language:e.Optional(s(["ar","zh","cs","nl","en","fr","de","he","hi","it","ja","ko","fa","pl","pt","ru","es","tr","vi"],{"ai:hidden":!0,"ui:group":"meta",title:"Language",default:"en",description:"Overrides the site language for this page. Leave blank to use the site default language.",enumNames:["Arabic","Chinese","Czech","Dutch","English","French","German","Hebrew","Hindi","Italian","Japanese","Korean","Persian","Polish","Portuguese","Russian","Spanish","Turkish","Vietnamese"]})),additionalTags:e.Optional(e.Object({headTags:e.Optional(e.String({title:"Head script tags",description:"Add custom tags to the <head> of your site. Useful for analytics tags, custom scripts, etc.","ai:instructions":"Don't include meta tags here, they are automatically generated.","ui:multiline":!0,"ui:textarea-class":"h-40 !font-mono","ui:placeholder":"<script src='https://example.com/script.js'></script>","ui:premium":!0,"ui:textarea-font-size":"1","ui:no-dynamic":!0})),bodyTags:e.Optional(e.String({title:"Body script tags",description:"Add custom tags to the <body> of your site. Useful for analytics tags, custom scripts, etc.","ui:multiline":!0,"ui:premium":!0,"ui:textarea-class":"h-40 !font-mono","ui:textarea-font-size":"1","ui:placeholder":"<script src='https://example.com/script.js'></script>","ui:no-dynamic":!0}))},{"ui:group":"meta"})),noNavbar:e.Optional(a("Hide navbar",!1,{"ui:group":"layout"})),noFooter:e.Optional(a("Hide footer",!1,{"ui:group":"layout"})),lastUpdated:e.Optional(m("Last updated",{"ui:hidden":!0,"ai:hidden":!0}))},{"ui:groups":{meta:"SEO & Meta tags",layout:"Layout"}});function k(){return i(e.Array(p(),{examples:[{queryId:"get-latest-posts",alias:"latestPosts"},{queryId:"get-user-profile",alias:"userProfile",params:[{field:"userId",op:"eq",value:":slug"}]}]}))}var f=e.Object({language:s(["ar","zh","cs","nl","en","fr","de","he","hi","it","ja","ko","fa","pl","pt","ru","es","tr","vi"],{title:"Site language",default:"en",enumNames:["Arabic","Chinese","Czech","Dutch","English","French","German","Hebrew","Hindi","Italian","Japanese","Korean","Persian","Polish","Portuguese","Russian","Spanish","Turkish","Vietnamese"],"ai:instructions":"Choose a value based on the site description. If the site is in multiple languages, use 'en'."}),backgroundImage:e.Optional(o()),colorPreset:e.Optional(n({examples:[{color:"base-100"},{color:"primary-500"},{color:"secondary-400"},{color:"neutral-400"},{color:"accent-200-gradient",gradientDirection:"bg-gradient-to-r"},{color:"neutral-800-gradient",gradientDirection:"bg-gradient-to-t"}]})),queries:e.Optional(e.Array(l,{title:"Site Queries","ui:field":"site-queries",description:"List of all queries available in this site. These can be used in any page.","ai:instructions":"This is where queries are first defined. They are then referenced in pages attributes (in the 'queries' field) to use them."})),navbar:e.Optional(e.Composite([d.props],{title:"Navbar","ui:group":"navbar"})),footer:e.Optional(e.Composite([g.props],{title:"Footer","ui:group":"footer"})),ogImage:e.Optional(u({title:"Social share image",description:"Image shown when this site is shared on social media","ai:hidden":!0,"ui:group":"meta","ui:no-object-options":!0,"ui:no-alt-text":!0,"ui:show-img-search":!1,"ui:no-dynamic":!0})),robotsIndexing:e.Optional(a("Allow search engines to index this site",!0,{description:"Disabling this will prevent search engines from indexing this site entirely","ai:hidden":!0,"ui:group":"meta"})),headTags:e.Optional(e.String({title:"Head script tags",description:"Add custom tags to the <head> of your site. Useful for analytics tags, custom scripts, etc.","ai:hidden":!0,"ui:multiline":!0,"ui:textarea-class":"h-40 !font-mono","ui:placeholder":"<script src='https://example.com/script.js'></script>","ui:premium":!0,"ui:textarea-font-size":"1","ui:group":"external","ui:no-dynamic":!0})),bodyTags:e.Optional(e.String({title:"Body script tags",description:"Add custom tags to the <body> of your site. Useful for analytics tags, custom scripts, etc.","ai:hidden":!0,"ui:multiline":!0,"ui:premium":!0,"ui:textarea-class":"h-40 !font-mono","ui:textarea-font-size":"1","ui:placeholder":"<script src='https://example.com/script.js'></script>","ui:group":"external","ui:no-dynamic":!0}))},{"ui:groups":{meta:"SEO & Meta tags",layout:"Layout",navbar:"Navbar",footer:"Footer",external:"External scripts"}});function M(){return i(e.Omit(f,["queries"]))}function D(){return i(e.Omit(h,["queries"]))}function z(){return i(e.Array(l))}function F(r={}){return{...c(h),...r}}function R(r={}){return{...c(f),...r}}export{h as a,k as b,f as c,M as d,D as e,z as f,F as g,R as h};
|
|
4
|
+
//# sourceMappingURL=chunk-AI4GHU7R.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shared/attributes.ts"],"sourcesContent":["import { Type, type Static } from \"@sinclair/typebox\";\nimport type { JSONSchemaType } from \"ajv\";\nimport { getSchemaDefaults } from \"../shared/utils/schema\";\nimport { manifest as navbarManifest } from \"./bricks/manifests/navbar.manifest\";\nimport { manifest as footerManifest } from \"./bricks/manifests/footer.manifest\";\nimport { string } from \"./bricks/props/string\";\nimport { boolean } from \"./bricks/props/boolean\";\nimport { datetime } from \"./bricks/props/date\";\nimport { imageRef } from \"./bricks/props/image\";\nimport { colorPresetRef } from \"./bricks/props/color-preset\";\nimport { queryUseRef, type QueryUseSettings } from \"./bricks/props/dynamic\";\nimport { querySchema } from \"./datasources/types\";\nimport { StringEnum } from \"./utils/string-enum\";\nimport { backgroundRef } from \"./bricks/props/background\";\nimport { toLLMSchema } from \"./utils/llm\";\n\nexport type { JSONSchemaType };\n\n// Default attributes\nexport const pageAttributesSchema = Type.Object(\n {\n backgroundImage: Type.Optional(backgroundRef()),\n colorPreset: Type.Optional(\n colorPresetRef({\n examples: [\n { color: \"base-100\" },\n { color: \"primary-500\" },\n { color: \"accent-100\", gradientDirection: \"bg-gradient-to-r\" },\n ],\n }),\n ),\n tags: Type.Optional(\n Type.Array(string(\"Tag\"), {\n title: \"Tags\",\n description:\n \"Use tags to organize, group and filter pages in navigation elements and in the dashboard. By default, the navbar element display pages having the 'navbar' tag, while the sidebar displays the pages with the tag 'sidebar'.\",\n \"ui:field\": \"tags\",\n examples: [[\"navbar\", \"navbar\"], [\"navbar\", \"sidebar\"], [\"sidebar\"]],\n }),\n ),\n path: string(\"URL path\", {\n default: \"/\",\n description: \"The URL path of the page. Use placeholders like :id or :slug for dynamic paths.\",\n \"ui:field\": \"path\",\n pattern: \"^/[a-z0-9-:/]*$\",\n examples: [\"/\", \"/about\", \"/products/:id\"],\n }),\n queries: Type.Optional(\n Type.Array(queryUseRef(), {\n title: \"Page Queries\",\n description:\n \"List of queries to use in this page. All listed queries will be executed when the page loads.\",\n \"ai:instructions\": \"Reference Query IDs to use at the page level.\",\n \"ui:field\": \"page-queries\",\n maxItems: 5,\n }),\n ),\n title: string(\"Title\", {\n default: \"Untitled\",\n \"ui:group\": \"meta\",\n \"ui:group:title\": \"Meta tags\",\n description: \"The title of the page. Appears in the browser tab and search results\",\n \"ui:placeholder\": \"Page title\",\n }),\n description: string(\"Description\", {\n \"ui:widget\": \"textarea\",\n \"ui:group\": \"meta\",\n \"ui:group:title\": \"Meta tags\",\n description: \"A short description of the page. Used by search engines\",\n \"ui:multiline\": true,\n \"ui:textarea-class\": \"h-24\",\n default: \"\",\n \"ui:placeholder\": \"A brief description of the page\",\n }),\n keywords: string(\"Keywords\", {\n \"ui:group\": \"meta\",\n \"ui:group:title\": \"Meta tags\",\n description: \"Keywords related to the page. Used by search engines\",\n \"ui:multiline\": true,\n default: \"\",\n \"ui:placeholder\": \"keyword1, keyword2, keyword3\",\n }),\n\n ogImage: Type.Optional(\n imageRef({\n title: \"Social share image\",\n description: \"Image shown when this page is shared on social media\",\n \"ui:group\": \"meta\",\n \"ai:hidden\": true,\n \"ui:no-object-options\": true,\n \"ui:no-alt-text\": true,\n \"ui:show-img-search\": false,\n \"ui:no-dynamic\": true,\n \"ui:placeholder\": \"https://example.com/image.jpg\",\n }),\n ),\n robotsIndexing: Type.Optional(\n boolean(\"Allow search engines to index this page\", true, {\n description: \"Disabling this will prevent search engines from indexing this page\",\n \"ai:hidden\": true,\n \"ui:group\": \"meta\",\n }),\n ),\n language: Type.Optional(\n StringEnum(\n [\n \"ar\",\n \"zh\",\n \"cs\",\n \"nl\",\n \"en\",\n \"fr\",\n \"de\",\n \"he\",\n \"hi\",\n \"it\",\n \"ja\",\n \"ko\",\n \"fa\",\n \"pl\",\n \"pt\",\n \"ru\",\n \"es\",\n \"tr\",\n \"vi\",\n ],\n {\n \"ai:hidden\": true,\n \"ui:group\": \"meta\",\n title: \"Language\",\n default: \"en\",\n description:\n \"Overrides the site language for this page. Leave blank to use the site default language.\",\n enumNames: [\n \"Arabic\",\n \"Chinese\",\n \"Czech\",\n \"Dutch\",\n \"English\",\n \"French\",\n \"German\",\n \"Hebrew\",\n \"Hindi\",\n \"Italian\",\n \"Japanese\",\n \"Korean\",\n \"Persian\",\n \"Polish\",\n \"Portuguese\",\n \"Russian\",\n \"Spanish\",\n \"Turkish\",\n \"Vietnamese\",\n ],\n },\n ),\n ),\n additionalTags: Type.Optional(\n Type.Object(\n {\n headTags: Type.Optional(\n Type.String({\n title: \"Head script tags\",\n description:\n \"Add custom tags to the <head> of your site. Useful for analytics tags, custom scripts, etc.\",\n \"ai:instructions\": \"Don't include meta tags here, they are automatically generated.\",\n \"ui:multiline\": true,\n \"ui:textarea-class\": \"h-40 !font-mono\",\n \"ui:placeholder\": \"<script src='https://example.com/script.js'></script>\",\n \"ui:premium\": true,\n \"ui:textarea-font-size\": \"1\",\n \"ui:no-dynamic\": true,\n }),\n ),\n bodyTags: Type.Optional(\n Type.String({\n title: \"Body script tags\",\n description:\n \"Add custom tags to the <body> of your site. Useful for analytics tags, custom scripts, etc.\",\n \"ui:multiline\": true,\n \"ui:premium\": true,\n \"ui:textarea-class\": \"h-40 !font-mono\",\n \"ui:textarea-font-size\": \"1\",\n \"ui:placeholder\": \"<script src='https://example.com/script.js'></script>\",\n \"ui:no-dynamic\": true,\n }),\n ),\n },\n { \"ui:group\": \"meta\" },\n ),\n ),\n\n noNavbar: Type.Optional(boolean(\"Hide navbar\", false, { \"ui:group\": \"layout\" })),\n noFooter: Type.Optional(boolean(\"Hide footer\", false, { \"ui:group\": \"layout\" })),\n lastUpdated: Type.Optional(\n datetime(\"Last updated\", {\n \"ui:hidden\": true,\n \"ai:hidden\": true,\n }),\n ),\n },\n {\n \"ui:groups\": {\n meta: \"SEO & Meta tags\",\n layout: \"Layout\",\n },\n },\n);\n\nexport function getPageQueriesSchemaForLLM() {\n return toLLMSchema(\n Type.Array(queryUseRef(), {\n examples: [\n { queryId: \"get-latest-posts\", alias: \"latestPosts\" },\n {\n queryId: \"get-user-profile\",\n alias: \"userProfile\",\n params: [{ field: \"userId\", op: \"eq\", value: \":slug\" }],\n },\n ] satisfies QueryUseSettings[],\n }),\n );\n}\n\nexport const siteAttributesSchema = Type.Object(\n {\n language: StringEnum(\n [\n \"ar\",\n \"zh\",\n \"cs\",\n \"nl\",\n \"en\",\n \"fr\",\n \"de\",\n \"he\",\n \"hi\",\n \"it\",\n \"ja\",\n \"ko\",\n \"fa\",\n \"pl\",\n \"pt\",\n \"ru\",\n \"es\",\n \"tr\",\n \"vi\",\n ],\n {\n title: \"Site language\",\n default: \"en\",\n enumNames: [\n \"Arabic\",\n \"Chinese\",\n \"Czech\",\n \"Dutch\",\n \"English\",\n \"French\",\n \"German\",\n \"Hebrew\",\n \"Hindi\",\n \"Italian\",\n \"Japanese\",\n \"Korean\",\n \"Persian\",\n \"Polish\",\n \"Portuguese\",\n \"Russian\",\n \"Spanish\",\n \"Turkish\",\n \"Vietnamese\",\n ],\n \"ai:instructions\":\n \"Choose a value based on the site description. If the site is in multiple languages, use 'en'.\",\n },\n ),\n backgroundImage: Type.Optional(backgroundRef()),\n colorPreset: Type.Optional(\n colorPresetRef({\n examples: [\n { color: \"base-100\" },\n { color: \"primary-500\" },\n { color: \"secondary-400\" },\n { color: \"neutral-400\" },\n { color: \"accent-200-gradient\", gradientDirection: \"bg-gradient-to-r\" },\n { color: \"neutral-800-gradient\", gradientDirection: \"bg-gradient-to-t\" },\n ],\n }),\n ),\n queries: Type.Optional(\n Type.Array(querySchema, {\n title: \"Site Queries\",\n \"ui:field\": \"site-queries\",\n description: \"List of all queries available in this site. These can be used in any page.\",\n \"ai:instructions\":\n \"This is where queries are first defined. They are then referenced in pages attributes (in the 'queries' field) to use them.\",\n }),\n ),\n navbar: Type.Optional(\n Type.Composite([navbarManifest.props], {\n title: \"Navbar\",\n \"ui:group\": \"navbar\",\n }),\n ),\n footer: Type.Optional(\n Type.Composite([footerManifest.props], {\n title: \"Footer\",\n \"ui:group\": \"footer\",\n // \"ui:hidden\": true, // Hidden in attributes panel. Users will have to click the brick to configure it, even if the configuration applies globally, so they have the same editing experience\n }),\n ),\n ogImage: Type.Optional(\n imageRef({\n title: \"Social share image\",\n description: \"Image shown when this site is shared on social media\",\n \"ai:hidden\": true,\n \"ui:group\": \"meta\",\n \"ui:no-object-options\": true,\n \"ui:no-alt-text\": true,\n \"ui:show-img-search\": false,\n \"ui:no-dynamic\": true,\n }),\n ),\n robotsIndexing: Type.Optional(\n boolean(\"Allow search engines to index this site\", true, {\n description: \"Disabling this will prevent search engines from indexing this site entirely\",\n \"ai:hidden\": true,\n \"ui:group\": \"meta\",\n }),\n ),\n headTags: Type.Optional(\n Type.String({\n title: \"Head script tags\",\n description:\n \"Add custom tags to the <head> of your site. Useful for analytics tags, custom scripts, etc.\",\n \"ai:hidden\": true,\n \"ui:multiline\": true,\n \"ui:textarea-class\": \"h-40 !font-mono\",\n \"ui:placeholder\": \"<script src='https://example.com/script.js'></script>\",\n \"ui:premium\": true,\n \"ui:textarea-font-size\": \"1\",\n \"ui:group\": \"external\",\n \"ui:no-dynamic\": true,\n }),\n ),\n bodyTags: Type.Optional(\n Type.String({\n title: \"Body script tags\",\n description:\n \"Add custom tags to the <body> of your site. Useful for analytics tags, custom scripts, etc.\",\n \"ai:hidden\": true,\n \"ui:multiline\": true,\n \"ui:premium\": true,\n \"ui:textarea-class\": \"h-40 !font-mono\",\n \"ui:textarea-font-size\": \"1\",\n \"ui:placeholder\": \"<script src='https://example.com/script.js'></script>\",\n \"ui:group\": \"external\",\n \"ui:no-dynamic\": true,\n }),\n ),\n },\n {\n \"ui:groups\": {\n meta: \"SEO & Meta tags\",\n layout: \"Layout\",\n navbar: \"Navbar\",\n footer: \"Footer\",\n external: \"External scripts\",\n },\n },\n);\n\nexport function getSiteAttributeschemaForLLM() {\n return toLLMSchema(Type.Omit(siteAttributesSchema, [\"queries\"]));\n}\n\nexport function getPageAttributeschemaForLLM() {\n return toLLMSchema(Type.Omit(pageAttributesSchema, [\"queries\"]));\n}\n\nexport function getSiteQueriesSchemaForLLM() {\n return toLLMSchema(Type.Array(querySchema));\n}\n\nexport type PageAttributes = Static<typeof pageAttributesSchema>;\nexport type SiteAttributes = Static<typeof siteAttributesSchema>;\n\nexport function resolvePageAttributes(data: Partial<PageAttributes> = {}) {\n const defaultAttrValues = getSchemaDefaults(pageAttributesSchema);\n return { ...defaultAttrValues, ...data } as PageAttributes;\n}\n\nexport function resolveSiteAttributes(data: Partial<SiteAttributes> = {}) {\n const defaultAttrValues = getSchemaDefaults(siteAttributesSchema);\n return { ...defaultAttrValues, ...data } as SiteAttributes;\n}\n"],"mappings":";;icAAA,OAAS,QAAAA,MAAyB,oBAmB3B,IAAMC,EAAuBC,EAAK,OACvC,CACE,gBAAiBA,EAAK,SAASC,EAAc,CAAC,EAC9C,YAAaD,EAAK,SAChBE,EAAe,CACb,SAAU,CACR,CAAE,MAAO,UAAW,EACpB,CAAE,MAAO,aAAc,EACvB,CAAE,MAAO,aAAc,kBAAmB,kBAAmB,CAC/D,CACF,CAAC,CACH,EACA,KAAMF,EAAK,SACTA,EAAK,MAAMG,EAAO,KAAK,EAAG,CACxB,MAAO,OACP,YACE,+NACF,WAAY,OACZ,SAAU,CAAC,CAAC,SAAU,QAAQ,EAAG,CAAC,SAAU,SAAS,EAAG,CAAC,SAAS,CAAC,CACrE,CAAC,CACH,EACA,KAAMA,EAAO,WAAY,CACvB,QAAS,IACT,YAAa,kFACb,WAAY,OACZ,QAAS,kBACT,SAAU,CAAC,IAAK,SAAU,eAAe,CAC3C,CAAC,EACD,QAASH,EAAK,SACZA,EAAK,MAAMI,EAAY,EAAG,CACxB,MAAO,eACP,YACE,gGACF,kBAAmB,gDACnB,WAAY,eACZ,SAAU,CACZ,CAAC,CACH,EACA,MAAOD,EAAO,QAAS,CACrB,QAAS,WACT,WAAY,OACZ,iBAAkB,YAClB,YAAa,uEACb,iBAAkB,YACpB,CAAC,EACD,YAAaA,EAAO,cAAe,CACjC,YAAa,WACb,WAAY,OACZ,iBAAkB,YAClB,YAAa,0DACb,eAAgB,GAChB,oBAAqB,OACrB,QAAS,GACT,iBAAkB,iCACpB,CAAC,EACD,SAAUA,EAAO,WAAY,CAC3B,WAAY,OACZ,iBAAkB,YAClB,YAAa,uDACb,eAAgB,GAChB,QAAS,GACT,iBAAkB,8BACpB,CAAC,EAED,QAASH,EAAK,SACZK,EAAS,CACP,MAAO,qBACP,YAAa,uDACb,WAAY,OACZ,YAAa,GACb,uBAAwB,GACxB,iBAAkB,GAClB,qBAAsB,GACtB,gBAAiB,GACjB,iBAAkB,+BACpB,CAAC,CACH,EACA,eAAgBL,EAAK,SACnBM,EAAQ,0CAA2C,GAAM,CACvD,YAAa,qEACb,YAAa,GACb,WAAY,MACd,CAAC,CACH,EACA,SAAUN,EAAK,SACbO,EACE,CACE,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACF,EACA,CACE,YAAa,GACb,WAAY,OACZ,MAAO,WACP,QAAS,KACT,YACE,2FACF,UAAW,CACT,SACA,UACA,QACA,QACA,UACA,SACA,SACA,SACA,QACA,UACA,WACA,SACA,UACA,SACA,aACA,UACA,UACA,UACA,YACF,CACF,CACF,CACF,EACA,eAAgBP,EAAK,SACnBA,EAAK,OACH,CACE,SAAUA,EAAK,SACbA,EAAK,OAAO,CACV,MAAO,mBACP,YACE,8FACF,kBAAmB,kEACnB,eAAgB,GAChB,oBAAqB,kBACrB,iBAAkB,wDAClB,aAAc,GACd,wBAAyB,IACzB,gBAAiB,EACnB,CAAC,CACH,EACA,SAAUA,EAAK,SACbA,EAAK,OAAO,CACV,MAAO,mBACP,YACE,8FACF,eAAgB,GAChB,aAAc,GACd,oBAAqB,kBACrB,wBAAyB,IACzB,iBAAkB,wDAClB,gBAAiB,EACnB,CAAC,CACH,CACF,EACA,CAAE,WAAY,MAAO,CACvB,CACF,EAEA,SAAUA,EAAK,SAASM,EAAQ,cAAe,GAAO,CAAE,WAAY,QAAS,CAAC,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AAC,EAAG,CAExE,MAAO,CAAE,GADiBC,EAAkBR,CAAoB,EACjC,GAAGO,CAAK,CACzC","names":["Type","pageAttributesSchema","Type","backgroundRef","colorPresetRef","string","queryUseRef","imageRef","boolean","StringEnum","datetime","getPageQueriesSchemaForLLM","toLLMSchema","siteAttributesSchema","querySchema","manifest","getSiteAttributeschemaForLLM","getPageAttributeschemaForLLM","getSiteQueriesSchemaForLLM","resolvePageAttributes","data","getSchemaDefaults","resolveSiteAttributes"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
2
|
|
|
3
|
-
import{c as d}from"./chunk-
|
|
3
|
+
import{c as d}from"./chunk-3YVJ2ELD.js";import{a as c}from"./chunk-RJYZ5FAR.js";import{m as a}from"./chunk-AFVJZPLS.js";import{b as n}from"./chunk-GACHLACT.js";import{b as s}from"./chunk-4BTB3MU2.js";import{b as i,d as p}from"./chunk-ZTZJHY4E.js";import{c as l}from"./chunk-CZRCW5EN.js";import{b as t,d as r}from"./chunk-SWLUQVK7.js";import{c as o}from"./chunk-OHNYCXPX.js";import{Type as e}from"@sinclair/typebox";import{RxBox as m}from"react-icons/rx";var k=c({type:"box",category:"container",name:"Box",description:"A container for stacking bricks horizontally or vertically.",aiInstructions:"A box is a container for other bricks. A box cannot contain other boxes as children. A box should contain at least 2 bricks to be useful, otherwise use a simple brick instead.",isContainer:!0,defaultWidth:{desktop:"auto",mobile:"100%"},defaultHeight:{desktop:"auto"},icon:m,props:d({colorPreset:e.Optional(l({title:"Color"})),direction:n({default:"flex-col",title:"Direction",description:"Direction of the box layout"}),justifyContent:e.Optional(t({default:"justify-center"})),alignItems:e.Optional(r({default:"items-stretch"})),gap:e.Optional(o({title:"Gap",default:"1rem",description:"Gap between children bricks.","ai:instructions":"Can be a tailwind gap class like 'gap-1' or 'gap-2', or a custom value like '10px'","ui:placeholder":"Not specified","ui:styleId":"styles:gap"})),padding:e.Optional(o({default:"1rem",description:"Padding inside the box.","ai:instructions":"Use only a single value like '1rem' or '10px'",title:"Padding","ui:placeholder":"Not specified","ui:styleId":"styles:padding"})),wrap:e.Optional(e.Boolean({title:"Wrap",description:"Wrap bricks if they overflow the section.",default:!1,"ui:styleId":"styles:wrap"})),rounding:e.Optional(p({default:"rounded-md"})),border:e.Optional(i()),shadow:e.Optional(s()),loop:e.Optional(a()),$children:e.Array(e.Any(),{"ui:field":"hidden",description:"List of nested bricks",default:[],examples:[[{type:"text",props:{content:"Hello World"}},{type:"image",props:{src:"https://via.placeholder.com/150",alt:"Placeholder Image"}}]]})})}),E=[{description:"A simple box with 2 text bricks aligned vertically",type:"box",props:{direction:"flex-col",gap:"1rem",$children:[{type:"text",props:{$children:[{type:"text",props:{content:"Hello World"}},{type:"text",props:{content:"Hello World"}}]}}]}},{description:"A horizontal box with wrapping enabled - images will wrap to new rows if they overflow",type:"box",props:{direction:"flex-row",gap:"1rem",wrap:!0,$children:[{type:"image",props:{src:"https://via.placeholder.com/150",alt:"Placeholder Image"}},{type:"image",props:{src:"https://via.placeholder.com/150",alt:"Placeholder Image"}},{type:"image",props:{src:"https://via.placeholder.com/150",alt:"Placeholder Image"}},{type:"image",props:{src:"https://via.placeholder.com/150",alt:"Placeholder Image"}},{type:"image",props:{src:"https://via.placeholder.com/150",alt:"Placeholder Image"}}]}},{description:"A vertical box with 2 text bricks and 1 image",type:"box",props:{direction:"flex-col",gap:"1rem",$children:[{type:"text",props:{content:"Hello World"}},{type:"image",props:{src:"https://via.placeholder.com/150",alt:"Placeholder Image"}},{type:"text",props:{content:"Hello World"}}]}},{description:"Employee directory using allEmployees query with vertical layout",type:"box",props:{direction:"flex-col",gap:"1.5rem",padding:"2rem",colorPreset:{color:"neutral-100"},rounding:"rounded-lg",loop:{over:"allEmployees"},$children:[{type:"text",props:{content:"<h3>{{allEmployees.name}}</h3><p><strong>{{allEmployees.position}}</strong></p><p>{{allEmployees.department}} \u2022 {{allEmployees.email}}</p>"}},{type:"image",props:{src:"{{allEmployees.photo}}",alt:"Photo of {{allEmployees.name}}"}}]}},{description:"Blog posts grid using blogPosts query with horizontal cards",type:"box",props:{direction:"flex-row",gap:"2rem",padding:"1rem",justifyContent:"justify-start",alignItems:"items-stretch",loop:{over:"blogPosts"},$children:[{type:"image",props:{src:"{{blogPosts.featuredImage}}",alt:"{{blogPosts.title}}"}},{type:"text",props:{content:"<h4>{{blogPosts.title}}</h4><p>{{blogPosts.excerpt}}</p><p><em>By {{blogPosts.author}} \u2022 {{blogPosts.publishDate}}</em></p>"}}]}},{description:"Featured products showcase using featuredProducts query",type:"box",props:{direction:"flex-col",gap:"1rem",padding:"1.5rem",colorPreset:{color:"primary-50"},border:{width:"border",color:"border-primary-200"},rounding:"rounded-xl",shadow:"shadow-md",loop:{over:"featuredProducts"},$children:[{type:"image",props:{src:"{{featuredProducts.image}}",alt:"{{featuredProducts.name}}"}},{type:"text",props:{content:"<h3>{{featuredProducts.name}}</h3><p>{{featuredProducts.description}}</p><p><strong>${{featuredProducts.price}}</strong></p>"}},{type:"button",props:{text:"Add to Cart",link:"/cart/add/{{featuredProducts.id}}"}}]}},{description:"Team members horizontal layout with wrapping - members will wrap to multiple rows on smaller screens",type:"box",props:{direction:"flex-row",gap:"2rem",padding:"2rem",wrap:!0,justifyContent:"justify-center",alignItems:"items-center",colorPreset:{color:"secondary-100"},loop:{over:"teamMembers"},$children:[{type:"image",props:{src:"{{teamMembers.avatar}}",alt:"{{teamMembers.fullName}}"}},{type:"text",props:{content:"<h4>{{teamMembers.fullName}}</h4><p>{{teamMembers.role}}</p><p>{{teamMembers.bio}}</p>"}}]}},{description:"Event listings using upcomingEvents query with accent styling",type:"box",props:{direction:"flex-col",gap:"1.25rem",padding:"2.5rem",colorPreset:{color:"accent-100"},border:{width:"border-2",color:"border-accent-300"},rounding:"rounded-lg",loop:{over:"upcomingEvents"},$children:[{type:"text",props:{content:"<h3>{{upcomingEvents.title}}</h3><p><strong>{{upcomingEvents.date}} at {{upcomingEvents.time}}</strong></p><p>{{upcomingEvents.venue}} \u2022 {{upcomingEvents.city}}</p><p>{{upcomingEvents.description}}</p>"}},{type:"button",props:{text:"Register Now",link:"/events/{{upcomingEvents.slug}}/register"}}]}},{description:"Testimonials carousel using customerTestimonials query",type:"box",props:{direction:"flex-col",gap:"1rem",padding:"3rem",justifyContent:"justify-center",alignItems:"items-center",colorPreset:{color:"neutral-50"},shadow:"shadow-lg",rounding:"rounded-2xl",loop:{over:"customerTestimonials"},$children:[{type:"text",props:{content:'<blockquote>"{{customerTestimonials.quote}}"</blockquote><p><strong>{{customerTestimonials.customerName}}</strong></p><p>{{customerTestimonials.company}} \u2022 {{customerTestimonials.position}}</p>'}},{type:"icon",props:{icon:"mdi:star",size:"1.5rem",color:"#fbbf24"}}]}},{description:"Portfolio projects using portfolioProjects query with horizontal layout",type:"box",props:{direction:"flex-row",gap:"1.5rem",padding:"1rem",alignItems:"items-start",justifyContent:"justify-start",loop:{over:"portfolioProjects"},$children:[{type:"image",props:{src:"{{portfolioProjects.thumbnail}}",alt:"{{portfolioProjects.projectName}}"}},{type:"text",props:{content:"<h4>{{portfolioProjects.projectName}}</h4><p>{{portfolioProjects.client}}</p><p>{{portfolioProjects.category}} \u2022 {{portfolioProjects.year}}</p><p>{{portfolioProjects.shortDescription}}</p>"}},{type:"button",props:{text:"View Project",link:"/portfolio/{{portfolioProjects.slug}}"}}]}},{description:"News articles using latestNews query with vertical stacking",type:"box",props:{direction:"flex-col",gap:"2rem",padding:"2rem",colorPreset:{color:"primary-100"},border:{width:"border",color:"border-primary-300"},loop:{over:"latestNews"},$children:[{type:"text",props:{content:"<h3>{{latestNews.headline}}</h3><p><strong>{{latestNews.category}}</strong> \u2022 {{latestNews.publishedDate}}</p><p>{{latestNews.summary}}</p>"}},{type:"text",props:{content:"<a href='/news/{{latestNews.slug}}'>Read full article \u2192</a>"}}]}},{description:"Service offerings using companyServices query with centered layout",type:"box",props:{direction:"flex-col",gap:"1rem",padding:"2rem",justifyContent:"justify-center",alignItems:"items-center",colorPreset:{color:"secondary-200"},rounding:"rounded-xl",shadow:"shadow-md",loop:{over:"companyServices"},$children:[{type:"icon",props:{icon:"{{companyServices.iconName}}",size:"2rem",color:"{{companyServices.iconColor}}"}},{type:"text",props:{content:"<h4>{{companyServices.serviceName}}</h4><p>{{companyServices.description}}</p><p><strong>Starting at ${{companyServices.price}}</strong></p>"}},{type:"button",props:{text:"Learn More",link:"/services/{{companyServices.serviceSlug}}"}}]}}];export{k as a,E as b};
|
|
4
|
+
//# sourceMappingURL=chunk-B3EATRFX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shared/bricks/manifests/box.manifest.ts"],"sourcesContent":["import { defineBrickManifest } from \"~/shared/brick-manifest\";\nimport { defineProps } from \"../props/helpers\";\nimport { Type } from \"@sinclair/typebox\";\nimport { borderRef, roundingRef } from \"../props/border\";\nimport { shadowRef } from \"../props/effects\";\nimport type { BrickProps } from \"../props/types\";\nimport { cssLengthRef } from \"../props/css-length\";\nimport { directionRef } from \"../props/direction\";\nimport { RxBox } from \"react-icons/rx\";\nimport { alignItemsRef, justifyContentRef } from \"../props/align\";\nimport { colorPresetRef } from \"../props/color-preset\";\nimport { loopRef } from \"../props/dynamic\";\n\n// Generic container can hold any type of array data source\nexport const manifest = defineBrickManifest({\n type: \"box\",\n category: \"container\",\n name: \"Box\",\n description: \"A container for stacking bricks horizontally or vertically.\",\n aiInstructions:\n \"A box is a container for other bricks. A box cannot contain other boxes as children. A box should contain at least 2 bricks to be useful, otherwise use a simple brick instead.\",\n isContainer: true,\n defaultWidth: {\n desktop: \"auto\",\n mobile: \"100%\",\n },\n defaultHeight: {\n desktop: \"auto\",\n },\n icon: RxBox,\n props: defineProps({\n colorPreset: Type.Optional(\n colorPresetRef({\n title: \"Color\",\n }),\n ),\n direction: directionRef({\n default: \"flex-col\",\n title: \"Direction\",\n description: \"Direction of the box layout\",\n }),\n justifyContent: Type.Optional(\n justifyContentRef({\n default: \"justify-center\",\n }),\n ),\n alignItems: Type.Optional(\n alignItemsRef({\n default: \"items-stretch\",\n }),\n ),\n gap: Type.Optional(\n cssLengthRef({\n title: \"Gap\",\n default: \"1rem\",\n description: \"Gap between children bricks.\",\n \"ai:instructions\":\n \"Can be a tailwind gap class like 'gap-1' or 'gap-2', or a custom value like '10px'\",\n \"ui:placeholder\": \"Not specified\",\n \"ui:styleId\": \"styles:gap\",\n }),\n ),\n padding: Type.Optional(\n cssLengthRef({\n default: \"1rem\",\n description: \"Padding inside the box.\",\n \"ai:instructions\": \"Use only a single value like '1rem' or '10px'\",\n title: \"Padding\",\n \"ui:placeholder\": \"Not specified\",\n \"ui:styleId\": \"styles:padding\",\n }),\n ),\n wrap: Type.Optional(\n Type.Boolean({\n title: \"Wrap\",\n description: \"Wrap bricks if they overflow the section.\",\n default: false,\n \"ui:styleId\": \"styles:wrap\",\n }),\n ),\n rounding: Type.Optional(\n roundingRef({\n default: \"rounded-md\",\n }),\n ),\n border: Type.Optional(borderRef()),\n shadow: Type.Optional(shadowRef()),\n loop: Type.Optional(loopRef()),\n $children: Type.Array(Type.Any(), {\n \"ui:field\": \"hidden\",\n description: \"List of nested bricks\",\n default: [],\n examples: [\n [\n {\n type: \"text\",\n props: {\n content: \"Hello World\",\n },\n },\n {\n type: \"image\",\n props: {\n src: \"https://via.placeholder.com/150\",\n alt: \"Placeholder Image\",\n },\n },\n ],\n ],\n }),\n }),\n});\n\nexport type Manifest = typeof manifest;\n\nexport const examples: {\n description: string;\n type: string;\n props: BrickProps<Manifest>[\"brick\"][\"props\"];\n}[] = [\n {\n description: \"A simple box with 2 text bricks aligned vertically\",\n type: \"box\",\n props: {\n direction: \"flex-col\",\n gap: \"1rem\",\n $children: [\n {\n type: \"text\",\n props: {\n $children: [\n {\n type: \"text\",\n props: {\n content: \"Hello World\",\n },\n },\n {\n type: \"text\",\n props: {\n content: \"Hello World\",\n },\n },\n ],\n },\n },\n ],\n },\n },\n {\n description: \"A horizontal box with wrapping enabled - images will wrap to new rows if they overflow\",\n type: \"box\",\n props: {\n direction: \"flex-row\",\n gap: \"1rem\",\n wrap: true,\n $children: [\n {\n type: \"image\",\n props: {\n src: \"https://via.placeholder.com/150\",\n alt: \"Placeholder Image\",\n },\n },\n {\n type: \"image\",\n props: {\n src: \"https://via.placeholder.com/150\",\n alt: \"Placeholder Image\",\n },\n },\n {\n type: \"image\",\n props: {\n src: \"https://via.placeholder.com/150\",\n alt: \"Placeholder Image\",\n },\n },\n {\n type: \"image\",\n props: {\n src: \"https://via.placeholder.com/150\",\n alt: \"Placeholder Image\",\n },\n },\n {\n type: \"image\",\n props: {\n src: \"https://via.placeholder.com/150\",\n alt: \"Placeholder Image\",\n },\n },\n ],\n },\n },\n {\n description: \"A vertical box with 2 text bricks and 1 image\",\n type: \"box\",\n props: {\n direction: \"flex-col\",\n gap: \"1rem\",\n $children: [\n {\n type: \"text\",\n props: {\n content: \"Hello World\",\n },\n },\n {\n type: \"image\",\n props: {\n src: \"https://via.placeholder.com/150\",\n alt: \"Placeholder Image\",\n },\n },\n {\n type: \"text\",\n props: {\n content: \"Hello World\",\n },\n },\n ],\n },\n },\n {\n description: \"Employee directory using allEmployees query with vertical layout\",\n type: \"box\",\n props: {\n direction: \"flex-col\",\n gap: \"1.5rem\",\n padding: \"2rem\",\n colorPreset: {\n color: \"neutral-100\",\n },\n rounding: \"rounded-lg\",\n loop: {\n over: \"allEmployees\",\n },\n $children: [\n {\n type: \"text\",\n props: {\n content:\n \"<h3>{{allEmployees.name}}</h3><p><strong>{{allEmployees.position}}</strong></p><p>{{allEmployees.department}} • {{allEmployees.email}}</p>\",\n },\n },\n {\n type: \"image\",\n props: {\n src: \"{{allEmployees.photo}}\",\n alt: \"Photo of {{allEmployees.name}}\",\n },\n },\n ],\n },\n },\n {\n description: \"Blog posts grid using blogPosts query with horizontal cards\",\n type: \"box\",\n props: {\n direction: \"flex-row\",\n gap: \"2rem\",\n padding: \"1rem\",\n justifyContent: \"justify-start\",\n alignItems: \"items-stretch\",\n loop: {\n over: \"blogPosts\",\n },\n $children: [\n {\n type: \"image\",\n props: {\n src: \"{{blogPosts.featuredImage}}\",\n alt: \"{{blogPosts.title}}\",\n },\n },\n {\n type: \"text\",\n props: {\n content:\n \"<h4>{{blogPosts.title}}</h4><p>{{blogPosts.excerpt}}</p><p><em>By {{blogPosts.author}} • {{blogPosts.publishDate}}</em></p>\",\n },\n },\n ],\n },\n },\n {\n description: \"Featured products showcase using featuredProducts query\",\n type: \"box\",\n props: {\n direction: \"flex-col\",\n gap: \"1rem\",\n padding: \"1.5rem\",\n colorPreset: {\n color: \"primary-50\",\n },\n border: {\n width: \"border\",\n color: \"border-primary-200\",\n },\n rounding: \"rounded-xl\",\n shadow: \"shadow-md\",\n loop: {\n over: \"featuredProducts\",\n },\n $children: [\n {\n type: \"image\",\n props: {\n src: \"{{featuredProducts.image}}\",\n alt: \"{{featuredProducts.name}}\",\n },\n },\n {\n type: \"text\",\n props: {\n content:\n \"<h3>{{featuredProducts.name}}</h3><p>{{featuredProducts.description}}</p><p><strong>${{featuredProducts.price}}</strong></p>\",\n },\n },\n {\n type: \"button\",\n props: {\n text: \"Add to Cart\",\n link: \"/cart/add/{{featuredProducts.id}}\",\n },\n },\n ],\n },\n },\n {\n description:\n \"Team members horizontal layout with wrapping - members will wrap to multiple rows on smaller screens\",\n type: \"box\",\n props: {\n direction: \"flex-row\",\n gap: \"2rem\",\n padding: \"2rem\",\n wrap: true,\n justifyContent: \"justify-center\",\n alignItems: \"items-center\",\n colorPreset: {\n color: \"secondary-100\",\n },\n loop: {\n over: \"teamMembers\",\n },\n $children: [\n {\n type: \"image\",\n props: {\n src: \"{{teamMembers.avatar}}\",\n alt: \"{{teamMembers.fullName}}\",\n },\n },\n {\n type: \"text\",\n props: {\n content: \"<h4>{{teamMembers.fullName}}</h4><p>{{teamMembers.role}}</p><p>{{teamMembers.bio}}</p>\",\n },\n },\n ],\n },\n },\n {\n description: \"Event listings using upcomingEvents query with accent styling\",\n type: \"box\",\n props: {\n direction: \"flex-col\",\n gap: \"1.25rem\",\n padding: \"2.5rem\",\n colorPreset: {\n color: \"accent-100\",\n },\n border: {\n width: \"border-2\",\n color: \"border-accent-300\",\n },\n rounding: \"rounded-lg\",\n loop: {\n over: \"upcomingEvents\",\n },\n $children: [\n {\n type: \"text\",\n props: {\n content:\n \"<h3>{{upcomingEvents.title}}</h3><p><strong>{{upcomingEvents.date}} at {{upcomingEvents.time}}</strong></p><p>{{upcomingEvents.venue}} • {{upcomingEvents.city}}</p><p>{{upcomingEvents.description}}</p>\",\n },\n },\n {\n type: \"button\",\n props: {\n text: \"Register Now\",\n link: \"/events/{{upcomingEvents.slug}}/register\",\n },\n },\n ],\n },\n },\n {\n description: \"Testimonials carousel using customerTestimonials query\",\n type: \"box\",\n props: {\n direction: \"flex-col\",\n gap: \"1rem\",\n padding: \"3rem\",\n justifyContent: \"justify-center\",\n alignItems: \"items-center\",\n colorPreset: {\n color: \"neutral-50\",\n },\n shadow: \"shadow-lg\",\n rounding: \"rounded-2xl\",\n loop: {\n over: \"customerTestimonials\",\n },\n $children: [\n {\n type: \"text\",\n props: {\n content:\n '<blockquote>\"{{customerTestimonials.quote}}\"</blockquote><p><strong>{{customerTestimonials.customerName}}</strong></p><p>{{customerTestimonials.company}} • {{customerTestimonials.position}}</p>',\n },\n },\n {\n type: \"icon\",\n props: {\n icon: \"mdi:star\",\n size: \"1.5rem\",\n color: \"#fbbf24\",\n },\n },\n ],\n },\n },\n {\n description: \"Portfolio projects using portfolioProjects query with horizontal layout\",\n type: \"box\",\n props: {\n direction: \"flex-row\",\n gap: \"1.5rem\",\n padding: \"1rem\",\n alignItems: \"items-start\",\n justifyContent: \"justify-start\",\n loop: {\n over: \"portfolioProjects\",\n },\n $children: [\n {\n type: \"image\",\n props: {\n src: \"{{portfolioProjects.thumbnail}}\",\n alt: \"{{portfolioProjects.projectName}}\",\n },\n },\n {\n type: \"text\",\n props: {\n content:\n \"<h4>{{portfolioProjects.projectName}}</h4><p>{{portfolioProjects.client}}</p><p>{{portfolioProjects.category}} • {{portfolioProjects.year}}</p><p>{{portfolioProjects.shortDescription}}</p>\",\n },\n },\n {\n type: \"button\",\n props: {\n text: \"View Project\",\n link: \"/portfolio/{{portfolioProjects.slug}}\",\n },\n },\n ],\n },\n },\n {\n description: \"News articles using latestNews query with vertical stacking\",\n type: \"box\",\n props: {\n direction: \"flex-col\",\n gap: \"2rem\",\n padding: \"2rem\",\n colorPreset: {\n color: \"primary-100\",\n },\n border: {\n width: \"border\",\n color: \"border-primary-300\",\n },\n loop: {\n over: \"latestNews\",\n },\n $children: [\n {\n type: \"text\",\n props: {\n content:\n \"<h3>{{latestNews.headline}}</h3><p><strong>{{latestNews.category}}</strong> • {{latestNews.publishedDate}}</p><p>{{latestNews.summary}}</p>\",\n },\n },\n {\n type: \"text\",\n props: {\n content: \"<a href='/news/{{latestNews.slug}}'>Read full article →</a>\",\n },\n },\n ],\n },\n },\n {\n description: \"Service offerings using companyServices query with centered layout\",\n type: \"box\",\n props: {\n direction: \"flex-col\",\n gap: \"1rem\",\n padding: \"2rem\",\n justifyContent: \"justify-center\",\n alignItems: \"items-center\",\n colorPreset: {\n color: \"secondary-200\",\n },\n rounding: \"rounded-xl\",\n shadow: \"shadow-md\",\n loop: {\n over: \"companyServices\",\n },\n $children: [\n {\n type: \"icon\",\n props: {\n icon: \"{{companyServices.iconName}}\",\n size: \"2rem\",\n color: \"{{companyServices.iconColor}}\",\n },\n },\n {\n type: \"text\",\n props: {\n content:\n \"<h4>{{companyServices.serviceName}}</h4><p>{{companyServices.description}}</p><p><strong>Starting at ${{companyServices.price}}</strong></p>\",\n },\n },\n {\n type: \"button\",\n props: {\n text: \"Learn More\",\n link: \"/services/{{companyServices.serviceSlug}}\",\n },\n },\n ],\n },\n },\n];\n"],"mappings":";;sXAEA,OAAS,QAAAA,MAAY,oBAMrB,OAAS,SAAAC,MAAa,iBAMf,IA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MACN,MAAO,CACL,UAAW,WACX,IAAK,OACL,UAAW,CACT,CACE,KAAM,OACN,MAAO,CACL,UAAW,CACT,CACE,KAAM,OACN,MAAO,CACL,QAAS,aACX,CACF,EACA,CACE,KAAM,OACN,MAAO,CACL,QAAS,aACX,CACF,CACF,CACF,CACF,CACF,CACF,CACF,EACA,CACE,YAAa,yFACb,KAAM,MACN,MAAO,CACL,UAAW,WACX,IAAK,OACL,KAAM,GACN,UAAW,CACT,CACE,KAAM,QACN,MAAO,CACL,IAAK,kCACL,IAAK,mBACP,CACF,EACA,CACE,KAAM,QACN,MAAO,CACL,IAAK,kCACL,IAAK,mBACP,CACF,EACA,CACE,KAAM,QACN,MAAO,CACL,IAAK,kCACL,IAAK,mBACP,CACF,EACA,CACE,KAAM,QACN,MAAO,CACL,IAAK,kCACL,IAAK,mBACP,CACF,EACA,CACE,KAAM,QACN,MAAO,CACL,IAAK,kCACL,IAAK,mBACP,CACF,CACF,CACF,CACF,EACA,CACE,YAAa,gDACb,KAAM,MACN,MAAO,CACL,UAAW,WACX,IAAK,OACL,UAAW,CACT,CACE,KAAM,OACN,MAAO,CACL,QAAS,aACX,CACF,EACA,CACE,KAAM,QACN,MAAO,CACL,IAAK,kCACL,IAAK,mBACP,CACF,EACA,CACE,KAAM,OACN,MAAO,CACL,QAAS,aACX,CACF,CACF,CACF,CACF,EACA,CACE,YAAa,mEACb,KAAM,MACN,MAAO,CACL,UAAW,WACX,IAAK,SACL,QAAS,OACT,YAAa,CACX,MAAO,aACT,EACA,SAAU,aACV,KAAM,CACJ,KAAM,cACR,EACA,UAAW,CACT,CACE,KAAM,OACN,MAAO,CACL,QACE,iJACJ,CACF,EACA,CACE,KAAM,QACN,MAAO,CACL,IAAK,yBACL,IAAK,gCACP,CACF,CACF,CACF,CACF,EACA,CACE,YAAa,8DACb,KAAM,MACN,MAAO,CACL,UAAW,WACX,IAAK,OACL,QAAS,OACT,eAAgB,gBAChB,WAAY,gBACZ,KAAM,CACJ,KAAM,WACR,EACA,UAAW,CACT,CACE,KAAM,QACN,MAAO,CACL,IAAK,8BACL,IAAK,qBACP,CACF,EACA,CACE,KAAM,OACN,MAAO,CACL,QACE,kIACJ,CACF,CACF,CACF,CACF,EACA,CACE,YAAa,0DACb,KAAM,MACN,MAAO,CACL,UAAW,WACX,IAAK,OACL,QAAS,SACT,YAAa,CACX,MAAO,YACT,EACA,OAAQ,CACN,MAAO,SACP,MAAO,oBACT,EACA,SAAU,aACV,OAAQ,YACR,KAAM,CACJ,KAAM,kBACR,EACA,UAAW,CACT,CACE,KAAM,QACN,MAAO,CACL,IAAK,6BACL,IAAK,2BACP,CACF,EACA,CACE,KAAM,OACN,MAAO,CACL,QACE,8HACJ,CACF,EACA,CACE,KAAM,SACN,MAAO,CACL,KAAM,cACN,KAAM,mCACR,CACF,CACF,CACF,CACF,EACA,CACE,YACE,uGACF,KAAM,MACN,MAAO,CACL,UAAW,WACX,IAAK,OACL,QAAS,OACT,KAAM,GACN,eAAgB,iBAChB,WAAY,eACZ,YAAa,CACX,MAAO,eACT,EACA,KAAM,CACJ,KAAM,aACR,EACA,UAAW,CACT,CACE,KAAM,QACN,MAAO,CACL,IAAK,yBACL,IAAK,0BACP,CACF,EACA,CACE,KAAM,OACN,MAAO,CACL,QAAS,wFACX,CACF,CACF,CACF,CACF,EACA,CACE,YAAa,gEACb,KAAM,MACN,MAAO,CACL,UAAW,WACX,IAAK,UACL,QAAS,SACT,YAAa,CACX,MAAO,YACT,EACA,OAAQ,CACN,MAAO,WACP,MAAO,mBACT,EACA,SAAU,aACV,KAAM,CACJ,KAAM,gBACR,EACA,UAAW,CACT,CACE,KAAM,OACN,MAAO,CACL,QACE,gNACJ,CACF,EACA,CACE,KAAM,SACN,MAAO,CACL,KAAM,eACN,KAAM,0CACR,CACF,CACF,CACF,CACF,EACA,CACE,YAAa,yDACb,KAAM,MACN,MAAO,CACL,UAAW,WACX,IAAK,OACL,QAAS,OACT,eAAgB,iBAChB,WAAY,eACZ,YAAa,CACX,MAAO,YACT,EACA,OAAQ,YACR,SAAU,cACV,KAAM,CACJ,KAAM,sBACR,EACA,UAAW,CACT,CACE,KAAM,OACN,MAAO,CACL,QACE,wMACJ,CACF,EACA,CACE,KAAM,OACN,MAAO,CACL,KAAM,WACN,KAAM,SACN,MAAO,SACT,CACF,CACF,CACF,CACF,EACA,CACE,YAAa,0EACb,KAAM,MACN,MAAO,CACL,UAAW,WACX,IAAK,SACL,QAAS,OACT,WAAY,cACZ,eAAgB,gBAChB,KAAM,CACJ,KAAM,mBACR,EACA,UAAW,CACT,CACE,KAAM,QACN,MAAO,CACL,IAAK,kCACL,IAAK,mCACP,CACF,EACA,CACE,KAAM,OACN,MAAO,CACL,QACE,mMACJ,CACF,EACA,CACE,KAAM,SACN,MAAO,CACL,KAAM,eACN,KAAM,uCACR,CACF,CACF,CACF,CACF,EACA,CACE,YAAa,8DACb,KAAM,MACN,MAAO,CACL,UAAW,WACX,IAAK,OACL,QAAS,OACT,YAAa,CACX,MAAO,aACT,EACA,OAAQ,CACN,MAAO,SACP,MAAO,oBACT,EACA,KAAM,CACJ,KAAM,YACR,EACA,UAAW,CACT,CACE,KAAM,OACN,MAAO,CACL,QACE,kJACJ,CACF,EACA,CACE,KAAM,OACN,MAAO,CACL,QAAS,kEACX,CACF,CACF,CACF,CACF,EACA,CACE,YAAa,qEACb,KAAM,MACN,MAAO,CACL,UAAW,WACX,IAAK,OACL,QAAS,OACT,eAAgB,iBAChB,WAAY,eACZ,YAAa,CACX,MAAO,eACT,EACA,SAAU,aACV,OAAQ,YACR,KAAM,CACJ,KAAM,iBACR,EACA,UAAW,CACT,CACE,KAAM,OACN,MAAO,CACL,KAAM,+BACN,KAAM,OACN,MAAO,+BACT,CACF,EACA,CACE,KAAM,OACN,MAAO,CACL,QACE,8IACJ,CACF,EACA,CACE,KAAM,SACN,MAAO,CACL,KAAM,aACN,KAAM,2CACR,CACF,CACF,CACF,CACF,CACF","names":["Type","RxBox","manifest","defineBrickManifest","RxBox","defineProps","Type","colorPresetRef","directionRef","justifyContentRef","alignItemsRef","cssLengthRef","roundingRef","borderRef","shadowRef","loopRef","examples"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
2
|
|
|
3
|
-
import{a as n}from"./chunk-
|
|
3
|
+
import{a as n}from"./chunk-KFM6KXSE.js";import{a as o}from"./chunk-JMN3HTZU.js";import{Type as t}from"@sinclair/typebox";function g(e="Image",i={}){let{defaultImageUrl:a,showImgSearch:c=!1,noObjectOptions:r=!1}=i;return t.Object({src:t.String({default:a,title:e,description:"Image URL. Can be a link to an image or a data URI"}),alt:t.Optional(t.String({title:"Alternate Text",description:"Alternative text for the image. Recommended for screen readers and SEO","ui:placeholder":"Your image description"})),fit:t.Optional(o(["object-none","object-contain","object-cover","object-fill","object-scale-down"],{enumNames:["None","Contain","Cover","Fill","Scale down"],title:"Fit",description:"How the image should be resized to fit its container",default:"object-cover","ui:field":"enum","ui:styleId":"styles:objectFit"})),position:t.Optional(o(["object-top","object-center","object-bottom","object-left","object-right","object-top-left","object-top-right","object-bottom-left","object-bottom-right"],{enumNames:["Top","Center","Bottom","Left","Right","Top left","Top right","Bottom left","Bottom right"],"ui:styleId":"styles:objectPosition",title:"Position",description:"The position of the image inside its container","ui:field":"enum"}))},{title:e,"ui:field":"image","ui:accept":"image/*","ui:show-img-search":c,"ui:no-object-options":r,default:{alt:"Image",fit:"object-cover",position:"object-center"},metadata:{category:"content"},...i})}function b(e={}){return n("assets:image",e)}export{g as a,b};
|
|
4
|
+
//# sourceMappingURL=chunk-CCI4C3TM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shared/bricks/props/image.ts"],"sourcesContent":["import { type SchemaOptions, Type, type Static, type ObjectOptions } from \"@sinclair/typebox\";\nimport { StringEnum } from \"~/shared/utils/string-enum\";\nimport { typedRef } from \"~/shared/utils/typed-ref\";\n\ntype PropImageOptions = {\n defaultImageUrl?: string;\n showImgSearch?: boolean;\n noObjectOptions?: boolean;\n} & ObjectOptions;\n\nexport function image(title = \"Image\", options: PropImageOptions = {}) {\n const { defaultImageUrl, showImgSearch = false, noObjectOptions = false } = options;\n const schema = Type.Object(\n {\n src: Type.String({\n default: defaultImageUrl,\n title,\n description: \"Image URL. Can be a link to an image or a data URI\",\n }),\n alt: Type.Optional(\n Type.String({\n title: \"Alternate Text\",\n description: \"Alternative text for the image. Recommended for screen readers and SEO\",\n \"ui:placeholder\": \"Your image description\",\n }),\n ),\n fit: Type.Optional(\n StringEnum([\"object-none\", \"object-contain\", \"object-cover\", \"object-fill\", \"object-scale-down\"], {\n enumNames: [\"None\", \"Contain\", \"Cover\", \"Fill\", \"Scale down\"],\n title: \"Fit\",\n description: \"How the image should be resized to fit its container\",\n default: \"object-cover\",\n \"ui:field\": \"enum\",\n \"ui:styleId\": \"styles:objectFit\",\n }),\n ),\n position: Type.Optional(\n StringEnum(\n [\n \"object-top\",\n \"object-center\",\n \"object-bottom\",\n \"object-left\",\n \"object-right\",\n \"object-top-left\",\n \"object-top-right\",\n \"object-bottom-left\",\n \"object-bottom-right\",\n ],\n {\n enumNames: [\n \"Top\",\n \"Center\",\n \"Bottom\",\n \"Left\",\n \"Right\",\n \"Top left\",\n \"Top right\",\n \"Bottom left\",\n \"Bottom right\",\n ],\n \"ui:styleId\": \"styles:objectPosition\",\n title: \"Position\",\n description: \"The position of the image inside its container\",\n \"ui:field\": \"enum\",\n },\n ),\n ),\n },\n {\n // $id: \"assets:image\",\n title,\n \"ui:field\": \"image\",\n \"ui:accept\": \"image/*\",\n \"ui:show-img-search\": showImgSearch,\n \"ui:no-object-options\": noObjectOptions,\n default: {\n alt: \"Image\",\n fit: \"object-cover\",\n position: \"object-center\",\n },\n // \"ui:responsive\": \"desktop\",\n metadata: {\n category: \"content\",\n },\n ...options,\n },\n );\n return schema;\n}\n\nexport function imageRef(options: PropImageOptions & SchemaOptions = {}) {\n return typedRef(\"assets:image\", options);\n}\n\nexport type ImageProps = Static<ReturnType<typeof image>>;\n"],"mappings":";;gFAAA,OAA6B,QAAAA,MAA6C,oBAUnE,SAASC,EAAMC,EAAQ,QAASC,EAA4B,CAAC,EAAG,CACrE,GAAM,CAAE,gBAAAC,EAAiB,cAAAC,EAAgB,GAAO,gBAAAC,EAAkB,EAAM,EAAIH,EA6E5E,OA5EeI,EAAK,OAClB,CACE,IAAKA,EAAK,OAAO,CACf,QAASH,EACT,MAAAF,EACA,YAAa,oDACf,CAAC,EACD,IAAKK,EAAK,SACRA,EAAK,OAAO,CACV,MAAO,iBACP,YAAa,yEACb,iBAAkB,wBACpB,CAAC,CACH,EACA,IAAKA,EAAK,SACRC,EAAW,CAAC,cAAe,iBAAkB,eAAgB,cAAe,mBAAmB,EAAG,CAChG,UAAW,CAAC,OAAQ,UAAW,QAAS,OAAQ,YAAY,EAC5D,MAAO,MACP,YAAa,uDACb,QAAS,eACT,WAAY,OACZ,aAAc,kBAChB,CAAC,CACH,EACA,SAAUD,EAAK,SACbC,EACE,CACE,aACA,gBACA,gBACA,cACA,eACA,kBACA,mBACA,qBACA,qBACF,EACA,CACE,UAAW,CACT,MACA,SACA,SACA,OACA,QACA,WACA,YACA,cACA,cACF,EACA,aAAc,wBACd,MAAO,WACP,YAAa,iDACb,WAAY,MACd,CACF,CACF,CACF,EACA,CAEE,MAAAN,EACA,WAAY,QACZ,YAAa,UACb,qBAAsBG,EACtB,uBAAwBC,EACxB,QAAS,CACP,IAAK,QACL,IAAK,eACL,SAAU,eACZ,EAEA,SAAU,CACR,SAAU,SACZ,EACA,GAAGH,CACL,CACF,CAEF,CAEO,SAASM,EAASN,EAA4C,CAAC,EAAG,CACvE,OAAOO,EAAS,eAAgBP,CAAO,CACzC","names":["Type","image","title","options","defaultImageUrl","showImgSearch","noObjectOptions","Type","StringEnum","imageRef","typedRef"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
2
|
|
|
3
|
-
import{a as l}from"./chunk-
|
|
3
|
+
import{a as l}from"./chunk-KYY3PHP7.js";import{a as e,c as p}from"./chunk-3YVJ2ELD.js";import{a as s}from"./chunk-RJYZ5FAR.js";import{a,d as n}from"./chunk-A3GF4PYW.js";import{b as r}from"./chunk-4BTB3MU2.js";import{d as t}from"./chunk-DHI3IBOD.js";import{b as o}from"./chunk-ZTZJHY4E.js";import{VscLayoutSidebarLeftOff as d}from"react-icons/vsc";import{Type as i}from"@sinclair/typebox";var O=s({type:"sidebar",category:"layout",name:"Sidebar",description:"A sidebar element",inlineDragDisabled:!0,isGlobalBrick:!0,duplicatable:!1,resizable:!1,movable:!1,aiInstructions:`
|
|
4
4
|
This brick should be used on most sites/pages for navigation. By default, it will display links
|
|
5
5
|
to the main pages of the site. You can customize the links by using the 'navigation.navItems' prop.
|
|
6
6
|
`.trim(),icon:d,props:p({container:i.Optional(e({title:"Main element",children:{backgroundColor:i.Optional(t()),border:i.Optional(o()),shadow:i.Optional(r()),fixedPositioned:i.Optional(l())},metadata:{"ui:responsive":!0}})),navigation:i.Optional(e({title:"Links",children:{navItems:i.Optional(i.Array(i.Object({urlOrPageId:n(),label:i.Optional(a("Label"))}),{title:"Navigation items",default:[]}))}}))})}),v=[{description:"Standard sidebar with navigation links base on site pages",type:"sidebar",props:{}},{description:"Sidebar with specified navigation links",type:"sidebar",props:{container:{backgroundColor:"#f0f0f0"},navigation:{navItems:[{urlOrPageId:"https://google.com",label:"Google"},{urlOrPageId:"https://bing.com",label:"Bing"}]}}}];export{O as a,v as b};
|
|
7
|
+
//# sourceMappingURL=chunk-CFF6Q7O7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shared/bricks/manifests/sidebar.manifest.ts"],"sourcesContent":["import { defineBrickManifest } from \"~/shared/brick-manifest\";\nimport { defineProps, group } from \"../props/helpers\";\nimport { VscLayoutSidebarLeftOff } from \"react-icons/vsc\";\nimport { Type } from \"@sinclair/typebox\";\nimport { string, urlOrPageIdRef } from \"../props/string\";\nimport { backgroundColorRef } from \"../props/background\";\nimport { borderRef } from \"../props/border\";\nimport { fixedPositioned } from \"../props/position\";\nimport type { BrickProps } from \"../props/types\";\nimport { shadowRef } from \"../props/effects\";\n\nexport const manifest = defineBrickManifest({\n type: \"sidebar\",\n category: \"layout\",\n name: \"Sidebar\",\n description: \"A sidebar element\",\n inlineDragDisabled: true,\n isGlobalBrick: true,\n duplicatable: false,\n resizable: false,\n movable: false,\n aiInstructions: `\n This brick should be used on most sites/pages for navigation. By default, it will display links\n to the main pages of the site. You can customize the links by using the 'navigation.navItems' prop.\n `.trim(),\n icon: VscLayoutSidebarLeftOff,\n props: defineProps({\n container: Type.Optional(\n group({\n title: \"Main element\",\n children: {\n backgroundColor: Type.Optional(backgroundColorRef()),\n border: Type.Optional(borderRef()),\n shadow: Type.Optional(shadowRef()),\n fixedPositioned: Type.Optional(fixedPositioned()),\n },\n metadata: {\n \"ui:responsive\": true,\n },\n }),\n ),\n navigation: Type.Optional(\n group({\n title: \"Links\",\n children: {\n navItems: Type.Optional(\n Type.Array(\n Type.Object({\n urlOrPageId: urlOrPageIdRef(),\n label: Type.Optional(string(\"Label\")),\n }),\n { title: \"Navigation items\", default: [] },\n ),\n ),\n },\n }),\n ),\n }),\n});\n\nexport type Manifest = typeof manifest;\n\nexport const examples: {\n description: string;\n type: string;\n props: BrickProps<Manifest>[\"brick\"][\"props\"];\n}[] = [\n {\n description: \"Standard sidebar with navigation links base on site pages\",\n type: \"sidebar\",\n props: {},\n },\n {\n description: \"Sidebar with specified navigation links\",\n type: \"sidebar\",\n props: {\n container: {\n backgroundColor: \"#f0f0f0\",\n },\n navigation: {\n navItems: [\n { urlOrPageId: \"https://google.com\", label: \"Google\" },\n { urlOrPageId: \"https://bing.com\", label: \"Bing\" },\n ],\n },\n },\n },\n];\n"],"mappings":";;iSAEA,OAAS,2BAAAA,MAA+B,kBACxC,OAAS,QAAAC,MAAY,oBAQd,IAAMC,EAAWC,EAAoB,CAC1C,KAAM,UACN,SAAU,SACV,KAAM,UACN,YAAa,oBACb,mBAAoB,GACpB,cAAe,GACf,aAAc,GACd,UAAW,GACX,QAAS,GACT,eAAgB;AAAA;AAAA;AAAA,IAGd,KAAK,EACP,KAAMC,EACN,MAAOC,EAAY,CACjB,UAAWC,EAAK,SACdC,EAAM,CACJ,MAAO,eACP,SAAU,CACR,gBAAiBD,EAAK,SAASE,EAAmB,CAAC,EACnD,OAAQF,EAAK,SAASG,EAAU,CAAC,EACjC,OAAQH,EAAK,SAASI,EAAU,CAAC,EACjC,gBAAiBJ,EAAK,SAASK,EAAgB,CAAC,CAClD,EACA,SAAU,CACR,gBAAiB,EACnB,CACF,CAAC,CACH,EACA,WAAYL,EAAK,SACfC,EAAM,CACJ,MAAO,QACP,SAAU,CACR,SAAUD,EAAK,SACbA,EAAK,MACHA,EAAK,OAAO,CACV,YAAaM,EAAe,EAC5B,MAAON,EAAK,SAASO,EAAO,OAAO,CAAC,CACtC,CAAC,EACD,CAAE,MAAO,mBAAoB,QAAS,CAAC,CAAE,CAC3C,CACF,CACF,CACF,CAAC,CACH,CACF,CAAC,CACH,CAAC,EAIYC,EAIP,CACJ,CACE,YAAa,4DACb,KAAM,UACN,MAAO,CAAC,CACV,EACA,CACE,YAAa,0CACb,KAAM,UACN,MAAO,CACL,UAAW,CACT,gBAAiB,SACnB,EACA,WAAY,CACV,SAAU,CACR,CAAE,YAAa,qBAAsB,MAAO,QAAS,EACrD,CAAE,YAAa,mBAAoB,MAAO,MAAO,CACnD,CACF,CACF,CACF,CACF","names":["VscLayoutSidebarLeftOff","Type","manifest","defineBrickManifest","VscLayoutSidebarLeftOff","defineProps","Type","group","backgroundColorRef","borderRef","shadowRef","fixedPositioned","urlOrPageIdRef","string","examples"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
2
|
|
|
3
|
-
import{a as r}from"./chunk-
|
|
3
|
+
import{a as r}from"./chunk-KFM6KXSE.js";import{a}from"./chunk-JMN3HTZU.js";import{Type as n}from"@sinclair/typebox";var t={"primary-50":{className:"bg-primary-50 text-primary-50-content",label:"Primary 50"},"primary-100":{className:"bg-primary-100 text-primary-100-content",label:"Primary 100"},"primary-200":{className:"bg-primary-200 text-primary-200-content",label:"Primary 200"},"primary-300":{className:"bg-primary-300 text-primary-300-content",label:"Primary 300"},"primary-400":{className:"bg-primary-400 text-primary-400-content",label:"Primary 400"},"primary-500":{className:"bg-primary-500 text-primary-500-content",label:"Primary 500"},"primary-600":{className:"bg-primary-600 text-primary-600-content",label:"Primary 600"},"primary-700":{className:"bg-primary-700 text-primary-700-content",label:"Primary 700"},"primary-800":{className:"bg-primary-800 text-primary-800-content",label:"Primary 800"},"primary-900":{className:"bg-primary-900 text-primary-900-content",label:"Primary 900"},"secondary-50":{className:"bg-secondary-50 text-secondary-50-content",label:"Secondary 50"},"secondary-100":{className:"bg-secondary-100 text-secondary-100-content",label:"Secondary 100"},"secondary-200":{className:"bg-secondary-200 text-secondary-200-content",label:"Secondary 200"},"secondary-300":{className:"bg-secondary-300 text-secondary-300-content",label:"Secondary 300"},"secondary-400":{className:"bg-secondary-400 text-secondary-400-content",label:"Secondary 400"},"secondary-500":{className:"bg-secondary-500 text-secondary-500-content",label:"Secondary 500"},"secondary-600":{className:"bg-secondary-600 text-secondary-600-content",label:"Secondary 600"},"secondary-700":{className:"bg-secondary-700 text-secondary-700-content",label:"Secondary 700"},"secondary-800":{className:"bg-secondary-800 text-secondary-800-content",label:"Secondary 800"},"secondary-900":{className:"bg-secondary-900 text-secondary-900-content",label:"Secondary 900"},"accent-50":{className:"bg-accent-50 text-accent-50-content",label:"Accent 50"},"accent-100":{className:"bg-accent-100 text-accent-100-content",label:"Accent 100"},"accent-200":{className:"bg-accent-200 text-accent-200-content",label:"Accent 200"},"accent-300":{className:"bg-accent-300 text-accent-300-content",label:"Accent 300"},"accent-400":{className:"bg-accent-400 text-accent-400-content",label:"Accent 400"},"accent-500":{className:"bg-accent-500 text-accent-500-content",label:"Accent 500"},"accent-600":{className:"bg-accent-600 text-accent-600-content",label:"Accent 600"},"accent-700":{className:"bg-accent-700 text-accent-700-content",label:"Accent 700"},"accent-800":{className:"bg-accent-800 text-accent-800-content",label:"Accent 800"},"accent-900":{className:"bg-accent-900 text-accent-900-content",label:"Accent 900"},"neutral-50":{className:"bg-neutral-50 text-neutral-50-content",label:"Neutral 50"},"neutral-100":{className:"bg-neutral-100 text-neutral-100-content",label:"Neutral 100"},"neutral-200":{className:"bg-neutral-200 text-neutral-200-content",label:"Neutral 200"},"neutral-300":{className:"bg-neutral-300 text-neutral-300-content",label:"Neutral 300"},"neutral-400":{className:"bg-neutral-400 text-neutral-400-content",label:"Neutral 400"},"neutral-500":{className:"bg-neutral-500 text-neutral-500-content",label:"Neutral 500"},"neutral-600":{className:"bg-neutral-600 text-neutral-600-content",label:"Neutral 600"},"neutral-700":{className:"bg-neutral-700 text-neutral-700-content",label:"Neutral 700"},"neutral-800":{className:"bg-neutral-800 text-neutral-800-content",label:"Neutral 800"},"neutral-900":{className:"bg-neutral-900 text-neutral-900-content",label:"Neutral 900"},"base-100":{className:"bg-base-100 text-base-100-content",label:"Base 100"},"base-200":{className:"bg-base-200 text-base-200-content",label:"Base 200"},"base-300":{className:"bg-base-300 text-base-300-content",label:"Base 300"},"primary-gradient-100":{className:"from-primary-100 to-primary-200 text-primary-100-content",label:"Primary gradient 1"},"primary-gradient-200":{className:"from-primary-200 to-primary-300 text-primary-200-content",label:"Primary gradient 2"},"primary-gradient-300":{className:"from-primary-300 to-primary-400 text-primary-300-content",label:"Primary gradient 3"},"primary-gradient-400":{className:"from-primary-400 to-primary-500 text-primary-400-content",label:"Primary gradient 4"},"primary-gradient-500":{className:"from-primary-500 to-primary-600 text-primary-500-content",label:"Primary gradient 5"},"primary-gradient-600":{className:"from-primary-600 to-primary-700 text-primary-600-content",label:"Primary gradient 6"},"primary-gradient-700":{className:"from-primary-700 to-primary-800 text-primary-700-content",label:"Primary gradient 7"},"primary-gradient-800":{className:"from-primary-800 to-primary-900 text-primary-800-content",label:"Primary gradient 8"},"secondary-gradient-100":{className:"from-secondary-100 to-secondary-200 text-secondary-100-content",label:"Secondary gradient 1"},"secondary-gradient-200":{className:"from-secondary-200 to-secondary-300 text-secondary-200-content",label:"Secondary gradient 2"},"secondary-gradient-300":{className:"from-secondary-300 to-secondary-400 text-secondary-300-content",label:"Secondary gradient 3"},"secondary-gradient-400":{className:"from-secondary-400 to-secondary-500 text-secondary-400-content",label:"Secondary gradient 4"},"secondary-gradient-500":{className:"from-secondary-500 to-secondary-600 text-secondary-500-content",label:"Secondary gradient 5"},"secondary-gradient-600":{className:"from-secondary-600 to-secondary-700 text-secondary-600-content",label:"Secondary gradient 6"},"secondary-gradient-700":{className:"from-secondary-700 to-secondary-800 text-secondary-700-content",label:"Secondary gradient 7"},"secondary-gradient-800":{className:"from-secondary-800 to-secondary-900 text-secondary-800-content",label:"Secondary gradient 8"},"accent-gradient-100":{className:"from-accent-100 to-accent-200 text-accent-100-content",label:"Accent gradient 1"},"accent-gradient-200":{className:"from-accent-200 to-accent-300 text-accent-200-content",label:"Accent gradient 2"},"accent-gradient-300":{className:"from-accent-300 to-accent-400 text-accent-300-content",label:"Accent gradient 3"},"accent-gradient-400":{className:"from-accent-400 to-accent-500 text-accent-400-content",label:"Accent gradient 4"},"accent-gradient-500":{className:"from-accent-500 to-accent-600 text-accent-500-content",label:"Accent gradient 5"},"accent-gradient-600":{className:"from-accent-600 to-accent-700 text-accent-600-content",label:"Accent gradient 6"},"accent-gradient-700":{className:"from-accent-700 to-accent-800 text-accent-700-content",label:"Accent gradient 7"},"accent-gradient-800":{className:"from-accent-800 to-accent-900 text-accent-800-content",label:"Accent gradient 8"},"neutral-gradient-100":{className:"from-neutral-100 to-neutral-200 text-neutral-100-content",label:"Neutral gradient 1"},"neutral-gradient-200":{className:"from-neutral-200 to-neutral-300 text-neutral-200-content",label:"Neutral gradient 2"},"neutral-gradient-300":{className:"from-neutral-300 to-neutral-400 text-neutral-300-content",label:"Neutral gradient 3"},"neutral-gradient-400":{className:"from-neutral-400 to-neutral-500 text-neutral-400-content",label:"Neutral gradient 4"},"neutral-gradient-500":{className:"from-neutral-500 to-neutral-600 text-neutral-500-content",label:"Neutral gradient 5"},"neutral-gradient-600":{className:"from-neutral-600 to-neutral-700 text-neutral-600-content",label:"Neutral gradient 6"},"neutral-gradient-700":{className:"from-neutral-700 to-neutral-800 text-neutral-700-content",label:"Neutral gradient 7"},"neutral-gradient-800":{className:"from-neutral-800 to-neutral-900 text-neutral-800-content",label:"Neutral gradient 8"},"base-gradient-100":{className:"from-base-100 to-base-200 text-base-100-content",label:"Base gradient 1"},"base-gradient-200":{className:"from-base-200 to-base-300 text-base-200-content",label:"Base gradient 2"},none:{className:"",label:"None"}};function d(e={}){return n.Object({color:a(Object.keys(t),{title:"Color preset",description:"Color preset to apply to background and text",enumNames:Object.keys(t).map(c=>t[c].label),"ai:instructions":"Presets are predefined color combinations of background and text colors that can be applied to elements. They include various shades of primary, secondary, accent, and neutral colors, as well as gradients. You can also select 'none' to remove any preset.","ui:styleId":"presets:color","ui:responsive":!0,default:e.default?.color}),gradientDirection:n.Optional(l(e))},{"ui:field":"color-preset",title:"Color preset","ui:presets":t,default:e.default,examples:[{color:"primary-500"},{color:"secondary-500"},{color:"accent-800",gradientDirection:"bg-gradient-to-t"}],"ui:default-gradient-direction":e["ui:default-gradient-direction"]??"bg-gradient-to-br"})}function y(e={}){return r("presets:color",e)}function l(e={}){return a(["bg-gradient-to-t","bg-gradient-to-r","bg-gradient-to-b","bg-gradient-to-l","bg-gradient-to-tl","bg-gradient-to-tr","bg-gradient-to-br","bg-gradient-to-bl"],{title:"Gradient direction",description:"The direction of the gradient. Only applies when color preset is a gradient.",enumNames:["Top","Right","Bottom","Left","Top left","Top right","Bottom right","Bottom left"],default:"bg-gradient-to-br","ui:responsive":"desktop","ui:styleId":"styles:gradientDirection",...e})}export{t as a,d as b,y as c};
|
|
4
|
+
//# sourceMappingURL=chunk-CZRCW5EN.js.map
|