UNPKG

@upstart.gg/sdk

Version:

You can test the CLI without recompiling by running:

36 lines (34 loc) 1.17 kB
import { Type } from "@sinclair/typebox"; //#region src/shared/bricks/props/string.ts function url(title = "URL", defaultValue) { return Type.String({ title, format: "url", "ui:field": "url", default: defaultValue }); } const pageIdSchema = Type.String({ "ui:field": "page-id" }); function urlOrPageId(options = {}) { return Type.Union([Type.String({ format: "url" }), pageIdSchema], { title: "URL", description: "A URL or a page ID", metadata: { category: "content" }, "ui:field": "url-page-id", "ai:instructions": "This field can be a URL or a page ID. Use the page ID when linking to a internal page, and a URL for external links. It can also contain page queries refrences like '/products/{{ categories.$slug }}' or '/blog/{{ blogPosts.$slug }}'.", ...options }); } function icon(options = {}) { return Type.String({ title: "Icon", description: "An icon from the Iconify collection", "ai:instructions": "Use a iconify reference like 'mdi:heart' or 'fa-solid:coffee'.", "ui:field": "iconify", metadata: { category: "content" }, ...options }); } //#endregion export { icon, url, urlOrPageId }; //# sourceMappingURL=string.js.map